Skip to content

Feature request: Stop debugger until first client connects #739

@jvilk-stripe

Description

@jvilk-stripe

Your proposal

Make it possible for the debugger to pause the program until the first client connects:

require "debug/open_wait_for_client"
# Program is now paused until the first debugger client connects

Once the first client connects, the program can proceed.

Additional context

We are working to integrate debug.rb into Stripe's Ruby test runner. The test runner needs to start the server and wait for VS Code to connect before running the tests.

debug/open does not work for this use case. debug/open pauses the program when the debugger starts, but does not resume the program after VS Code connects. Instead, VS Code reports the program as paused on a breakpoint in our test runner code. The user then has to hit "resume" to run their tests and hit the breakpoints that they actually set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions