Setting up Node.js debugger with Nodemon and Typescript in VSCode editor

Refer to [article](https://dev.to/oieduardorabelo/nodejs-with-typescript-debug-inside-vscode-and-nodemon-23o7) for more information
pull/1/head
Jennifer Nguyen 2020-07-02 00:42:31 -07:00
parent 3015eeb262
commit 312f1324ca
3 changed files with 20 additions and 2 deletions

13
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,13 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Node: Nodemon",
"processId": "${command:PickProcess}",
"restart": true,
"protocol": "inspector"
}
]
}

View File

@ -2,5 +2,9 @@
"watch": ["src"], "watch": ["src"],
"ext": "ts", "ext": "ts",
"ignore": ["src/**/*.spec.ts"], "ignore": ["src/**/*.spec.ts"],
"exec": "ts-node ./src/app.ts" "execMap": {
"ts": "node --require ts-node/register"
},
"verbose": true,
"restartable": "rs"
} }

View File

@ -17,6 +17,7 @@
"typescript": "^3.9.5" "typescript": "^3.9.5"
}, },
"scripts": { "scripts": {
"start": "nodemon" "start": "nodemon src/app.ts",
"debug": "nodemon --inspect src/app.ts"
} }
} }