API for stopping the debugger

Open
#1,122 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
devtools

Research direction

No file or test is named. Begin by locating the debugger's public API and the DEBUGGER__::SESSION@server behavior described here; completion would require a documented way to stop the loaded debugger during execution and validation that RubyMine can attach without the reported hang.

Written by the indexing model from the issue text.

Description

Apologies if such a feature is already present, I couldn't find it in the project.

Could I request an API method to stop the debugger once it's been loaded? I'm from the RubyMine team, and our use case for this is the following: the users would like to be able to launch their program and then later attach our debugger to it. Our debugger conflicts with the debug gem, however, so if the user project contains this gem (and Rails apps include it by default), then the attaching our debugger will lead to problems (mostly hanging, I think). The debug gem is loaded at the program start, so if we try to attach our debugger later, we cannot disable the debugger from debug, and so our debugger won't work; the only way to disable it is by setting the environment variable RUBY_DEBUG_ENABLE before launching the program, but that is up to the user only, not to RubyMine (if they launch their app in the terminal, not via an RM run configuration). So, is it or would it be possible to shut the debugger down completely during execution? Then we could call such a hypothetical stop method upon starting our debugger, and everything would work.

To be more precise, one of the incompatibilities is that our debugger hangs at the DEBUGGER__::SESSION@server thread, though there may be other issues as well.

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.