get_debug_output
Retrieve real-time debug information and error logs from the Godot game engine to identify and resolve issues during development.
Instructions
Get the current debug output and errors
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1158-1184 (handler)The handler function that executes the get_debug_output tool logic. It checks if there is an active Godot process and returns its captured output and errors as JSON, or an error message if no process is running.private async handleGetDebugOutput() { if (!this.activeProcess) { return this.createErrorResponse( 'No active Godot process.', [ 'Use run_project to start a Godot project first', 'Check if the Godot process crashed unexpectedly', ] ); } return { content: [ { type: 'text', text: JSON.stringify( { output: this.activeProcess.output, errors: this.activeProcess.errors, }, null, 2 ), }, ], }; }
- src/index.ts:704-708 (schema)The input schema for the get_debug_output tool, specifying an empty object with no required properties.inputSchema: { type: 'object', properties: {}, required: [], },
- src/index.ts:702-709 (registration)The tool registration entry in the list_tools response, defining the name, description, and schema for get_debug_output.name: 'get_debug_output', description: 'Get the current debug output and errors', inputSchema: { type: 'object', properties: {}, required: [], }, },
- src/index.ts:939-940 (registration)The switch case in the CallToolRequestSchema handler that routes calls to get_debug_output to its handler function.return await this.handleGetDebugOutput(); case 'stop_project':
- src/index.ts:39-43 (helper)Helper interface defining the GodotProcess object used to store the process, output, and errors accessed by the get_debug_output handler.interface GodotProcess { process: any; output: string[]; errors: string[]; }