Repository navigation
Debugger raises "undefined method `prerelease?' for nil:NilClass (NoMethodError)" in CDP #472
Copy link
Copy link
Closed
Description
Your environment
ruby -v:
ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]rdbg -v:
Describe the bug
A clear and concise description of what the bug is.
When I debug irb, debugger raised "undefined method `prerelease?' for nil:NilClass (NoMethodError)" as follows:
$ exe/rdbg -c irb --open=chrome
DEBUGGER: Debugger can attach via TCP/IP (127.0.0.1:52808)
DEBUGGER: wait for debugger connection...
DEBUGGER: Connected.
["DEBUGGER Exception: /Users/naotto/workspace/debug/lib/debug/thread_client.rb:986",
#<NoMethodError: undefined method `prerelease?' for nil:NilClass>,
["/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:88:in `prerelease?'",
"/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:75:in `inspect'",
"/Users/naotto/workspace/debug/lib/debug/server_cdp.rb:877:in `variable_'",
"/Users/naotto/workspace/debug/lib/debug/server_cdp.rb:922:in `variable'",
"/Users/naotto/workspace/debug/lib/debug/server_cdp.rb:791:in `process_cdp'",
"/Users/naotto/workspace/debug/lib/debug/thread_client.rb:977:in `wait_next_action_'",
"/Users/naotto/workspace/debug/lib/debug/thread_client.rb:676:in `wait_next_action'",
"/Users/naotto/workspace/debug/lib/debug/thread_client.rb:284:in `suspend'",
"/Users/naotto/workspace/debug/lib/debug/thread_client.rb:318:in `block in step_tp'",
"/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:36:in `initialize'",
"/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:264:in `new'",
"/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:264:in `find_spec_for_exe'",
"/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:300:in `activate_bin_path'",
"/Users/naotto/.rbenv/versions/3.0.0/bin/irb:23:in `<main>'"]]
/Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:88:in `prerelease?': undefined method `prerelease?' for nil:NilClass (NoMethodError)
from /Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:75:in `inspect'
from /Users/naotto/workspace/debug/lib/debug/server_cdp.rb:877:in `variable_'
from /Users/naotto/workspace/debug/lib/debug/server_cdp.rb:922:in `variable'
from /Users/naotto/workspace/debug/lib/debug/server_cdp.rb:791:in `process_cdp'
from /Users/naotto/workspace/debug/lib/debug/thread_client.rb:977:in `wait_next_action_'
from /Users/naotto/workspace/debug/lib/debug/thread_client.rb:676:in `wait_next_action'
from /Users/naotto/workspace/debug/lib/debug/thread_client.rb:284:in `suspend'
from /Users/naotto/workspace/debug/lib/debug/thread_client.rb:318:in `block in step_tp'
from /Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems/dependency.rb:36:in `initialize'
from /Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:264:in `new'
from /Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:264:in `find_spec_for_exe'
from /Users/naotto/.rbenv/versions/3.0.0/lib/ruby/site_ruby/3.0.0/rubygems.rb:300:in `activate_bin_path'
from /Users/naotto/.rbenv/versions/3.0.0/bin/irb:23:in `<main>'To Reproduce
exe/rdbg -c irb --open=chromeThen, press "StepInto" button 25 times.
Expected behavior
It should not raise an error.
Additional context
Add any other context about the problem here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Debugger raises `undefined method `prerelease?' for nil:NilClass (NoMethodError)` in CDP[/-][+]Debugger raises "undefined method `prerelease?' for nil:NilClass (NoMethodError)" in CDP[/+]Use "DEBUGGER__.safe_inspect" when debugger inspects objects
Use "DEBUGGER__.safe_inspect" when objects are inspected
Use "DEBUGGER__.safe_inspect" when objects are inspected