get_session_status
Retrieve the current XDebug session status to check if a session is active, its state, location, and available actions. Use this to diagnose issues before starting a new session.
Instructions
Returns the current debug session status. Call this FIRST before starting a new session.
WHEN TO USE:
Before start_debug_session: Check if a session is already active
During debugging: See current location and available actions
After errors: Diagnose session state
RETURNS:
active: Whether a session exists
status: Current state (see below)
location: Current file and line when paused
available_actions: Valid control_execution actions
breakpoints: List of registered breakpoints
SESSION STATES:
"initializing": Starting, waiting for XDebug connection
"listening": Listening for connections (XDebug not connected yet)
"connected": XDebug connected, execution starting
"paused": Stopped at breakpoint - can inspect variables and step
"running": Code executing, waiting for breakpoint
"stopped": Session ended
"error": Session in error state
STUCK SESSION RECOVERY: If status is "initializing" for >30 seconds, the connection likely failed. Use control_execution with action="stop" to reset, then check your XDebug configuration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||