Closed
Description
- VS Code Version: 1.12.2
- OS Version: Windows 8.1 x64
- Node.js Version: 7.10.0
I have a nodemon
with ts-node
, which watch for changes in TypeScript code and recompile every time it happens. In .vscode/launch.json
I set "request": "launch"
and console: "externalTerminal"
and start debug. Everytime I change code a new process starts while the previous is still currently active. Figure:
Repro:
git clone https://github.com/Deilan/node-typescript-vscode.git
(Web)npm i
- Replace
launch.json
's contents with the contents below. - Launch
Launch via nodemon
debug configuration. - Wait till the debugger connects to the process.
- Change
./src/index.ts
in any way
Expect:
The process continue execution and debugger reconnects to it.
OR
The process finishes and debugger create a new process and connects to it.
(I'm not yet sure what is more correct by design)
Actual:
The process continues exection, debugger launches a new process and connects to it.
.vscode/launch.json
:
{
{
"name": "Launch via nodemon",
"type": "node",
"request": "launch",
"protocol": "inspector",
"cwd": "${workspaceRoot}",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/nodemon",
"runtimeArgs": [
"--exitcrash",
"--exec",
"${workspaceRoot}/node_modules/.bin/ts-node",
"${workspaceRoot}/src/index.ts"
],
"windows": {
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/nodemon.cmd"
},
"restart": true,
"console": "externalTerminal"
},
]
}