Skip to content

Unexpected stoppage on remote debugging connection #629

@st0012

Description

@st0012

Recently I mostly use remote debugging and this trap (https://github.com/ruby/debug/blob/master/lib/debug/server.rb#L229) means the program (usually Rails server) will be stopped upon connection, even with the nonstop flag.

And I'll need to manually skip the first few frames every time the connection is established, which is annoying. One example:

❯ ~/projects/debug/exe/rdbg -A
# No sourcefile available for /Users/st0012/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/puma-5.6.2/lib/puma/single.rb
=>#0    [C] Thread#join at ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/puma-5.6.2/lib/puma/single.rb:61
  #1    Puma::Single#run at ~/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/puma-5.6.2/lib/puma/single.rb:61
  # and 16 frames (use `bt' command for all frames)

Stop by SIGURG
(rdbg:remote)

So my questions are:

  1. Why does the debugger need to stop for this signal?

  2. If it's needed in some cases, can we skip this behavior when nonstop flag is used?

  3. Why should the debuggee be paused with signal by itself upon activation? The stoppage is triggered by the debugger server itself (pause source)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions