debugger_start
Start a debugging session with auto-detection or specified debugger type to control program execution, examine memory, and analyze stack in GDB.
Instructions
Start a debugging session with auto-detection or specified debugger type.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| debugger_type_param | No | ||
| debugger_path | No |
Implementation Reference
- server.py:42-56 (handler)Main MCP tool handler for debugger_start. Registered with @mcp.tool() decorator, validates debugger availability, sets default path, and delegates to debugger_tools.start_session()
@mcp.tool() def debugger_status() -> str: """Get status of available debuggers.""" return DebuggerFactory.list_debuggers() @mcp.tool() def debugger_start(debugger_type_param: str = None, debugger_path: str = None) -> str: """Start a debugging session with auto-detection or specified debugger type.""" if not debugger_tools: return "Error: No debuggers are available on this system" if debugger_path is None: debugger_path = "gdb" # Default to gdb return debugger_tools.start_session(debugger_path) - modules/gdb/gdbTools.py:68-71 (handler)GDB-specific implementation of start_session. Creates a GDB session via the session manager and returns session ID
@handle_gdb_errors("starting GDB session") def start_session(self, gdb_path: str = "gdb") -> str: session_id = self.sessionManager.create_session(gdb_path) return f"GDB session started successfully. Session ID: {session_id}" - modules/lldb/lldbTools.py:55-58 (handler)LLDB-specific implementation of start_session. Creates an LLDB session via the session manager and returns session ID
@handle_lldb_errors("starting LLDB session") def start_session(self, debugger_path: Optional[str] = None) -> str: session_id = self.session_manager.create_session(debugger_path) return f"LLDB session started successfully. Session ID: {session_id}" - modules/base/debuggerBase.py:42-45 (schema)Abstract interface definition for start_session method that all debugger implementations must provide
@abstractmethod def start_session(self, debugger_path: str = None) -> str: """Start a new debugging session.""" pass - modules/gdb/sessionManager.py:16-25 (helper)Low-level GDB session creation using GdbController with MI3 interpreter, generates UUID session ID
def create_session(self, gdb_path: str = "gdb") -> str: session_id = str(uuid.uuid4()) try: gdb_controller = GdbController(command=[gdb_path, "--interpreter=mi3"]) self.sessions[session_id] = gdb_controller logger.info(f"Started GDB session: {session_id}") return session_id except Exception as e: logger.error(f"Failed to start GDB session: {e}") raise