Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug that debugger raise an error when breakpoints are set in script snippets #412

Merged
merged 2 commits into from
Nov 30, 2021

Conversation

ono-max
Copy link
Member

@ono-max ono-max commented Nov 26, 2021

@ko1-san giving me the following bug report:

Describe the bug

After setting breakpoints at a script snippet in Snippets pane, execute debugger. Then debugger raise an error such as:

DEBUGGER: wait for debugger connection...
DEBUGGER: Connected.
DEBUGGER: ReaderThreadError: undefined method `[]' for nil:NilClass
["/Users/naotto/workspace/debug/lib/debug/server_cdp.rb:198:in `block in process'",
 "/Users/naotto/workspace/debug/lib/debug/server_cdp.rb:106:in `loop'",
 "/Users/naotto/workspace/debug/lib/debug/server_cdp.rb:106:in `process'",
 "/Users/naotto/workspace/debug/lib/debug/server.rb:69:in `block (3 levels) in activate'",
 "/Users/naotto/workspace/debug/lib/debug/server.rb:212:in `setup_interrupt'",
 "/Users/naotto/workspace/debug/lib/debug/server.rb:67:in `block (2 levels) in activate'",
 "/Users/naotto/workspace/debug/lib/debug/server.rb:359:in `block (2 levels) in accept'",
 "/Users/naotto/.rbenv/versions/2.6.7/lib/ruby/2.6.0/socket.rb:809:in `block (2 levels) in accept_loop'",
 "/Users/naotto/.rbenv/versions/2.6.7/lib/ruby/2.6.0/socket.rb:806:in `each'",
 "/Users/naotto/.rbenv/versions/2.6.7/lib/ruby/2.6.0/socket.rb:806:in `block in accept_loop'",
 "/Users/naotto/.rbenv/versions/2.6.7/lib/ruby/2.6.0/socket.rb:804:in `loop'",
 "/Users/naotto/.rbenv/versions/2.6.7/lib/ruby/2.6.0/socket.rb:804:in `accept_loop'",
 "/Users/naotto/workspace/debug/lib/debug/server.rb:357:in `block in accept'",
 "/Users/naotto/.rbenv/versions/2.6.7/lib/ruby/2.6.0/socket.rb:781:in `tcp_server_sockets'",
 "/Users/naotto/workspace/debug/lib/debug/server.rb:338:in `accept'",
 "/Users/naotto/workspace/debug/lib/debug/server.rb:48:in `block in activate'"]
DEBUGGER: Disconnected.

Cause

The reason why this error occurs is urls of script snippets are started with http://debuggee~. This PR fixes it.

@ko1 ko1 merged commit 7a42175 into ruby:master Nov 30, 2021
@ono-max ono-max deleted the patch-02 branch November 30, 2021 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants