start_debug_session
Start a local HTTP server to receive logs from instrumented code for interactive debugging with AI coding assistants.
Instructions
Start a debug session. This starts a local HTTP server to receive logs from instrumented code.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Port number for the debug server (default: 9876) |
Implementation Reference
- src/index.ts:134-147 (handler)The handler logic for the 'start_debug_session' tool. It parses the input port (default 9876), starts a new debug session using SessionManager, initializes the Instrumenter, and returns a success message with session details.case 'start_debug_session': { const port = (args?.port as number) || 9876; const session = await sessionManager.startSession(port); instrumenter = new Instrumenter(port); return { content: [ { type: 'text', text: `Debug session started!\n\nSession ID: ${session.id}\nServer: http://localhost:${port}\nLog file: ${session.logFile}\n\nYou can now add instruments to capture variable values.`, }, ], }; }
- src/index.ts:37-46 (schema)The input schema definition for the 'start_debug_session' tool, specifying an optional 'port' parameter.inputSchema: { type: 'object', properties: { port: { type: 'number', description: 'Port number for the debug server (default: 9876)', default: 9876, }, }, },
- src/index.ts:34-47 (registration)Registration of the 'start_debug_session' tool in the ListToolsRequestHandler, including name, description, and input schema.{ name: 'start_debug_session', description: 'Start a debug session. This starts a local HTTP server to receive logs from instrumented code.', inputSchema: { type: 'object', properties: { port: { type: 'number', description: 'Port number for the debug server (default: 9876)', default: 9876, }, }, }, },