I want to debug and set breakpoints on typescript files and restart the debugger when changes are made (like nodemon watch for changes) with VSCode debugger configuration.
Until now I acheived running via VSCode and restart on changes without debugging.
Here's my launch.json:
{
"name": "Launch Typescript Server Debugger",
"request": "launch",
"type": "node",
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"stopOnEntry": false,
"program": "${workspaceRoot}/node_modules/nodemon/bin/nodemon",
"args": [
"--watch",
"src/**/*.ts",
"--ignore",
"src/**/*.spec.ts",
"--exec",
"${workspaceRoot}/node_modules/.bin/ts-node",
"--inspect",
"src/app.ts"
],
"restart": true,
"env": { "NODE_ENV": "dev"}
}
Any ideas?