Standalone CLI reports a paused session after its adapter exits during navigation
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 58/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
Línea de trabajo
Read src/cli/dapClient.ts around the process-exit callback and src/cli/cliDebuggingExecutor.ts around the terminated callback and runThreadCommand error path. Trace how a rejected next or continue request can restore an older stopped state after adapter exit. Use the linked synthetic-adapter harness to check that abrupt exits leave get_debug_status at no-session, while live request rejections preserve the paused session.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
When a standalone debug adapter exits while a step or continue request is
pending, the navigation call correctly returns an adapter-exit error. The next
get_debug_status nevertheless reports an active, paused session, even though
the adapter process is gone.
A rejected navigation request from an adapter that remains alive should preserve
the paused session. An adapter process exit should instead leave no active
session. The reproduction distinguishes these two outcomes.
Environment
- DebugMCP source commit:
d0b4a334a6a3d8d600c5aa75ec60d9de272af3c4. - Verified baseline: Windows x64, Node.js 24.22.1, compiled
out/modules. - The root extension manifest at this commit reports version 2.4.4; this is not
a claim about an installed or published standalone npm package version. - A bounded synthetic Node DAP adapter over standard input/output; no language
debugger, VS Code debug session or real debuggee is started.
Reproduction steps
-
In a writable working directory, create a separate upstream checkout and build the reviewed revision. The commands use PowerShell:
$debugMcpRoot = Join-Path (Get-Location) 'DebugMCP-review-target' git clone https://github.com/microsoft/DebugMCP.git $debugMcpRoot git -C $debugMcpRoot checkout d0b4a334a6a3d8d600c5aa75ec60d9de272af3c4 Push-Location $debugMcpRoot npm ci --ignore-scripts npm run compile Pop-Location -
Obtain the reproduction project from its default main branch and run the test against that separate upstream checkout:
$reproRoot = Join-Path (Get-Location) 'debugmcp-review-repro' git clone https://github.com/hahnfk/debugmcp-repro.git $reproRoot Push-Location $reproRoot node scripts/review/cli-adapter-exit-navigation.cjs --debugmcp-root $debugMcpRoot Pop-LocationReproduction sources and evidence:
-
The test creates a fresh production
CliDebuggingExecutorand
DebuggingHandlerfor each scenario. Their realDapClientstarts the
fixture as a child process and performs the DAP initialization and launch
sequence. The fixture reports a breakpoint stop. The test confirms the
public status is active and paused and reads the fixture's process ID and
per-run marker through a public evaluation request. -
For
step_over, the handler sends DAPnext. The fixture immediately calls
process.exit(23)with that request still pending. It sends no response,
exitedevent orterminatedevent. The actualDapClientchild-process
exit path rejects the pending request. -
After receiving the navigation error, confirm that the fixture process is
absent and call the publicget_debug_statushandler. -
Repeat with
continue_execution, which sends DAPcontinue. Each case uses
a fresh executor so no previous-session startup state is involved.
The test also runs four controls: live adapters rejecting next and continue
with success:false, a normal step to a new stop, and a normal continue through
program completion. All six initial launches must succeed.
The default regression command exits nonzero on the reviewed commit. To require
the exact current bug, all positive controls and successful cleanup, use:
node (Join-Path $reproRoot 'scripts/review/cli-adapter-exit-navigation.cjs') --debugmcp-root $debugMcpRoot --expect-current-bug
An arbitrary startup failure, navigation timeout, or live adapter's ordinary
request rejection does not count as reproducing this adapter-exit bug.
Expected result
Both abrupt-exit cases should return the adapter-exit error from navigation.
Afterward, get_debug_status should report:
{
"status": "no-session",
"sessionActive": false,
"paused": false
}
For comparison, a live adapter's rejected request should preserve its active,
paused session, and the adapter should still answer a fixture-identity request.
Normal step and continue operations should retain their usual behavior.
Actual result
Navigation reports an error containing:
Debug adapter exited with exit code 23
The fixture process is absent. Nevertheless, the subsequent public status is:
{
"status": "paused",
"sessionActive": true,
"paused": true
}
The stale active-session result occurs for both next and continue. The
live-rejection and normal-navigation controls behave as expected. Process and
session IDs in the emitted JSON are observations from each local run, not
constants that other users must reproduce.
Cause
The production
DapClient process-exit callback
rejects pending requests and synchronously emits the client exit event. The
executor's
terminated callback
therefore marks the session terminated and clears its thread/frame context.
When the rejected navigation request resumes its asynchronous error path,
runThreadCommand restores previousState,
overwriting that newer termination with the old stopped state. The status
request then treats the dead adapter's session as active and paused.
Restoring the previous paused state is appropriate for the live-rejection
controls. It should not replace a newer adapter-exit state.
Scope and test seams
This is a standalone-executor lifecycle report. The reproduction uses the actual
compiled executor, handler and DAP-client implementations. It does not write
their private fields or replace their methods. Test seams are the synthetic DAP
peer, a deterministic configuration-manager double, the shared loader's inert
vscode import, and a quiet logger sink.
The fixture starts no debuggee and exits on closed input or its own ten-second
deadline. The harness has a separate twenty-second deadline. Normal cleanup uses
executor.dispose() and the production DAP client's owned child-process handle;
PID checks are read-only, and historical process IDs are never kill targets.
The JSON reports the tested commit, Node version, source/compiled-module hashes,
all controls and fixture-process cleanup. A rebuilt local fix can be tested with
the normal regression oracle; sourceDirty remains visible in its output.
Related reports
Issue #161 and merged
PR #162 address breakpoint
synchronization between sessions by resetting adapter initialization. This case
concerns an in-flight navigation request restoring stale execution state after
an actual adapter process exit.
Investigation tooling
This investigation and its reproduction work were carried out with assistance
from OpenAI Codex.
- Codex desktop app version:
26.1021.31345(build21828). - Version verified on
2026-10-25, when this tooling disclosure was added.
The automated reproduction runs directly as an isolated Node.js harness against
the DebugMCP implementation. Codex assisted the investigation, harness authoring
and report preparation.
- Lenguaje dominante
- TypeScript
- Estrellas
- 580
- Forks
- 63
- Merge medio
- 1 d 17 h
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/DebugMCP
-
Skill: support MSVC debuggerAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
[Feature Request] Register the MCP server via VS Code's native API and add zh-CN localizationAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/DebugMCP
Issues similares
-
Report: &TV InternationalAbiertocheck:passed streams:remove
Dificultad 1/5 Menos de una hora Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
bug priority-p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
beginner blocked
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
hiero-ledger/hiero-sdk-js#4670 ·
Los mantenedores suelen responder en 1 día
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.AbiertoMonthly Not a priority
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Expensify/App#106080 · 1 comentario ·
Los mantenedores suelen responder en 1 día