Launch a Node script under the debugger
launchStart a Node.js script with the V8 Inspector attached, pausing at the first line to apply breakpoints before resuming execution unless stop_on_entry is enabled.
Instructions
Start node <script> [args] with the inspector attached. The process is paused at its first line until breakpoints are applied, then resumed unless stop_on_entry is true. Any previous session is torn down first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"script": "<script>"
},
"name": "launch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for the process and for resolving breakpoint paths. Defaults to the server's cwd. | |
| env | No | Extra environment variables. | |
| args | No | Command-line arguments for the script. | |
| script | Yes | Path to the entry script (relative to cwd or absolute). | |
| node_args | No | Extra flags for node itself, e.g. ['--enable-source-maps'] or ['--import','tsx']. | |
| stop_on_entry | No | Stay paused on the first line instead of running. |