Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MAX_DATA | No | Max data size per variable | 2048 |
| LOG_LEVEL | No | Log level: debug, info, warn, error | info |
| MAX_DEPTH | No | Max depth for variable inspection | 3 |
| XDEBUG_HOST | No | Host to bind | 0.0.0.0 |
| XDEBUG_PORT | No | Port to listen for Xdebug connections | 9003 |
| MAX_CHILDREN | No | Max children to return for arrays/objects | 128 |
| PATH_MAPPINGS | No | JSON object mapping container to host paths | |
| COMMAND_TIMEOUT | No | Command timeout in milliseconds | 30000 |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_sessions | List all active PHP debug sessions with their current state |
| get_session_state | Get detailed state of a specific debug session including current position and status |
| set_active_session | Set which debug session should be the active/default session for subsequent commands |
| close_session | Close and terminate a debug session |
| set_breakpoint | Set a breakpoint in PHP code. Supports line breakpoints and conditional breakpoints with hit counts. Can be set before a debug session starts - breakpoints will be applied when a session connects. |
| set_exception_breakpoint | Set a breakpoint that triggers when a specific exception is thrown. Can be set before a debug session starts. |
| set_call_breakpoint | Set a breakpoint that triggers when a specific function is called. Can be set before a debug session starts. |
| remove_breakpoint | Remove a breakpoint by its ID. Works for both active session breakpoints and pending breakpoints. |
| update_breakpoint | Update a breakpoint (enable/disable or change hit conditions). Works for both active session and pending breakpoints. |
| list_breakpoints | List all breakpoints including both active session breakpoints and pending breakpoints |
| continue | Continue script execution until the next breakpoint or end of script |
| step_into | Step into the next function call, or to the next line if not a function call. This follows execution into called functions. |
| step_over | Step over to the next line in the current scope. Function calls are executed but not stepped into. |
| step_out | Step out of the current function. Execution continues until the current function returns. |
| stop | Stop the debug session and terminate script execution immediately |
| detach | Detach from the debug session and let the script continue running without debugging |
| get_stack_trace | Get the current call stack showing all function calls leading to the current position |
| get_contexts | Get available variable contexts (Local, Superglobals, User-defined constants) at the current position |
| get_variables | Get all variables at the current execution point. Use context_id to switch between local variables, superglobals, etc. |
| get_variable | Get a specific variable by name, including nested properties. Use PHP syntax for nested access (e.g., '$user->name', '$array[0]', '$obj->items[2]->value') |
| set_variable | Set the value of a variable in the current scope |
| evaluate | Evaluate a PHP expression in the current context. Returns the result of the expression. Use for calculations, method calls, or inspecting computed values. |
| get_source | Get the source code of a file or a specific line range |
| add_watch | Add a watch expression that will be evaluated on each break. Watch expressions persist across steps. |
| remove_watch | Remove a watch expression |
| evaluate_watches | Evaluate all watch expressions and return their current values |
| list_watches | List all active watch expressions |
| add_logpoint | Add a logpoint that logs messages without stopping execution. Use {varName} placeholders for variables. |
| remove_logpoint | Remove a logpoint |
| get_logpoint_history | Get the log output history from logpoints |
| start_profiling | Start profiling to track memory usage and execution time |
| stop_profiling | Stop profiling and get the results |
| get_profile_stats | Get current profiling statistics |
| get_memory_timeline | Get memory usage timeline from profiling |
| capture_request_context | Capture the current HTTP request context ($_GET, $_POST, $_SESSION, $_COOKIE, headers) |
| add_step_filter | Add a step filter to skip certain files/directories during stepping (e.g., vendor code) |
| list_step_filters | List all step filter rules |
| get_function_history | Get the history of function calls made during debugging |
| start_coverage | Start tracking code coverage during debugging |
| stop_coverage | Stop tracking code coverage and get the report |
| get_coverage_report | Get the current code coverage report |
| save_debug_profile | Save the current debug configuration (breakpoints, watches, filters) as a named profile |
| load_debug_profile | Load a saved debug profile |
| list_debug_profiles | List all saved debug profiles |
| export_session | Export the current debug session as a report |
| capture_snapshot | Capture a snapshot of the current debug state for the export report |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |