You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[RFC / Feature Request] Multi-session debugging support via optional sessionId #159
Currently, DebugMCP assumes a single active debug session model by binding operations to vscode.debug.activeDebugSession.
In complex application architectures (e.g. frontend + backend services launched via compound debug configurations, client/server setups, microservices, or parent/child worker processes), multiple DAP debug sessions run concurrently in the same VS Code workspace. When this happens, an AI agent cannot deterministically target or inspect a specific session without risking race conditions or relying on VS Code's global active session focus.
Motivation
For AI agents managing full-stack or multi-process debugging workflows:
Targeted Inspection & Stepping: The agent needs to step or inspect variables in the backend service while the frontend service continues running (or vice-versa).
Session Disambiguation: Without a session identifier, inspection tools (get_variables_values, evaluate_expression) fail or hit the wrong target if another session steals focus.
Active Session Map in DebuggingExecutor: Maintain a map of active debug sessions (Map<string, vscode.DebugSession>) updated via onDidStartDebugSession / onDidTerminateDebugSession.
Optional sessionId?: string Parameter: Add an optional sessionId to tool schemas:
Graceful Fallback: If sessionId is omitted, fall back to vscode.debug.activeDebugSession, keeping 100% backward compatibility for standard single-session workflows.
Session Enumeration: Provide an easy way for agents to list active sessions (their IDs, names, and types) to discover target IDs.
Status & Contribution Handoff
We validated this pattern in our own workflows and wanted to document the architecture and share the reference branch for anyone in the community interested in taking this forward.
Because we currently lack the bandwidth to drive this implementation to completion or actively shepherd a PR, we are leaving this RFC and prototype open for the maintainers or any community contributor to adopt, adapt, or build upon whenever multi-session support becomes a priority.
Activity