pause_execution
Temporarily halt the execution of a Node.js process during debugging to inspect and analyze its current state for effective troubleshooting.
Instructions
Pause execution of the debugged process
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:612-648 (handler)The handler function for the 'pause_execution' tool. Checks if a debug session is active, then calls Debugger.pause() on the CDP client to pause execution, returning success or error message.private async pauseExecution() { if (!this.debugSession.connected || !this.debugSession.client) { return { content: [ { type: "text", text: "No active debug session. Please attach debugger first.", }, ], isError: true, }; } try { const { Debugger } = this.debugSession.client; await Debugger.pause(); return { content: [ { type: "text", text: "Execution paused successfully", }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error pausing execution: ${error}`, }, ], isError: true, }; } }
- src/index.ts:218-225 (registration)Tool registration in the ListTools response, including name, description, and empty input schema (no parameters required).{ name: "pause_execution", description: "Pause execution of the debugged process", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:262-264 (registration)Dispatch case in the CallToolRequestHandler switch statement that routes calls to the pauseExecution handler method.case "pause_execution": return await this.pauseExecution();