Restarting an rdbg attach session terminates the debuggee process

Open
#1,184 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
ruby, vscode
Domain
devtools

Research direction

Start by reproducing the VS Code Restart action with an rdbg attach session, then trace how the disconnect request handles restart: true and terminateDebuggee: true. Done means restarting or reconnecting the debugger without terminating the attached Ruby process; add or update coverage for this attach-session behavior if the relevant test location is found.

Written by the indexing model from the issue text.

Description

Your environment

  • ruby -v: 4.0.5
  • rdbg -v: 1.11.1

Describe the bug
When attaching to an existing Ruby process with rdbg, pressing the Restart button in VS Code terminates the debuggee process.

To Reproduce

  1. Start a Ruby process with rdbg attach enabled.
  2. Attach from VS Code using the rdbg extension.
  3. Press the Restart button in the Debug toolbar.

Expected behavior
The debugger session should restart/reconnect without terminating the attached Ruby process.

Additional context
When pressing Restart, VS Code sends:

{
  "command": "disconnect",
  "arguments": {
    "restart": true,
    "terminateDebuggee": true
  },
  "type": "request"
}

After this, the debuggee terminates.

Dominant language
Ruby
Stars
1.3k
Forks
146
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ruby/debug

All issues in ruby/debug

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.