Skip to content

Node.js debug: New process is being created after each debugger restart #28108

Closed
@Deilan

Description

@Deilan
  • 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:

image

Repro:

  1. git clone https://github.com/Deilan/node-typescript-vscode.git (Web)
  2. npm i
  3. Replace launch.json's contents with the contents below.
  4. Launch Launch via nodemon debug configuration.
  5. Wait till the debugger connects to the process.
  6. 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"
        },
    ]
}

Metadata

Metadata

Assignees

Labels

*not-reproducibleIssue cannot be reproduced by VS Code Team member as describeddebugDebug viewlet, configurations, breakpoints, adapter issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions