Skip to content

Ruby launch sessions on Windows end in state 'error' instead of 'stopped' — even for clean, successful scripts #258

Description

@debugmcpdev

Found during the #244 default-exception validation sweep (2026-08-04, Windows, dev build at feat/244).

Symptom

A Ruby launch session whose script runs to completion — cleanly or via an unhandled raise — ends with session state error, not stopped. The debuggee itself behaves correctly (all stdout captured, script fully executed); it's the terminal session state that's wrong.

Reproduced with both:

  • a clean script (puts twice, exit 0) → state error
  • a crashing script (raise "boom") → state error (no exception pause expected or seen — Ruby correctly has no breakOnExceptions default)

Evidence

Log trace (logs/debug-mcp-server-30004.log, both sessions identical shape):

ProxyManager ... Exit: code=1
[SM _updateSessionState] running -> error
"proxy exited during startup"

The rdbg-wrapping proxy process exits with OS code 1 regardless of debuggee outcome, and SessionManager maps that to ERROR. Callers polling for state === 'stopped' as the termination signal never see it for Ruby launches on Windows.

Notes

Expected

Clean completion → state stopped with the debuggee exit code surfaced (as Python/js do); crash → stopped with non-zero exit code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions