Launch Node program
debug_launchStart a Node.js script under the debugger, pausing before execution to set breakpoints. Returns a session ID for subsequent debugging commands.
Instructions
Spawn a Node program under --inspect-brk=127.0.0.1:0 and return a new sessionId in awaiting_start. cwd defaults to the package root of program (the directory that owns that file's node_modules). User code does not run until debug_continue, debug_resume, or debug_wait_for_pause. Set breakpoints in the entry script and in node_modules packages before continuing. require/import/loader are optional --require/--import/--experimental-loader injects, resolved from the program's node_modules. Child processes are auto-attached by default. Call again to debug another program in parallel. Runs the target as the MCP user. launch executes a process; evaluate runs JavaScript inside it. Only use on a trusted local workspace. Inspector is bound to 127.0.0.1.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory. Defaults to the package root of program (walks up from the file, skipping node_modules) | |
| env | No | Extra environment variables (merged over the MCP process env) | |
| args | No | Arguments passed to the program | |
| label | No | Optional label shown in debug_list_sessions | |
| import | No | Optional --import modules, resolved from the program file node_modules | |
| loader | No | Optional --experimental-loader modules, resolved from the program file node_modules | |
| program | Yes | Entry script path, absolute or relative to cwd | |
| require | No | Optional --require modules, resolved from the program file node_modules (CJS hooks, @babel/register) | |
| runtimeArgs | No | Extra runtime args inserted after inspect/preload flags | |
| autoLoadBabel | No | Auto --require @babel/register from the program node_modules when a Babel config exists. Default: true for .jsx/.ts/.tsx, false for .js | |
| runtimeExecutable | No | Runtime binary. Defaults to the Node executable running this MCP server | |
| autoAttachChildren | No | Auto-attach child_process children and worker_threads. Default true |