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

Debug command does not work when IRB.conf[:USE_SINGLELINE] is set #909

Closed
tompng opened this issue Mar 23, 2024 · 0 comments · Fixed by #1006
Closed

Debug command does not work when IRB.conf[:USE_SINGLELINE] is set #909

tompng opened this issue Mar 23, 2024 · 0 comments · Fixed by #1006

Comments

@tompng
Copy link
Member

tompng commented Mar 23, 2024

Description

When IRB.conf[:USE_SINGLELINE] = true is set in .irbrc, debug command raises error.

From: a.rb @ line 4 :

    1: def foo
    2: end
    3: 
 => 4: binding.irb
    5: 
    6: foo
irb(main):001> debug
#<Thread:0x0000000126230268@DEBUGGER__::SESSION@server /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/debug-1.9.1/lib/debug/session.rb:179 run> terminated with exception (report_on_exception is true):
/Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb/debug.rb:72:in `block in setup': NoMethodError
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/reline-0.4.3/lib/reline/line_editor.rb:1185:in `modify_lines'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/reline-0.4.3/lib/reline/line_editor.rb:1061:in `render_whole_lines'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/reline-0.4.3/lib/reline/line_editor.rb:1041:in `rerender_all_lines'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/reline-0.4.3/lib/reline/line_editor.rb:476:in `rerender'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/reline-0.4.3/lib/reline.rb:340:in `inner_readline'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/reline-0.4.3/lib/reline.rb:288:in `readline'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/3.3.0/forwardable.rb:240:in `readline'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/3.3.0/forwardable.rb:240:in `readline'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb/input-method.rb:214:in `gets'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb.rb:1036:in `block in read_input'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb.rb:1323:in `signal_status'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb.rb:1034:in `read_input'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb.rb:1062:in `block in readmultiline'
	from <internal:kernel>:187:in `loop'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb.rb:1061:in `readmultiline'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb.rb:1083:in `block in each_top_level_statement'
	from <internal:kernel>:187:in `loop'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb.rb:1082:in `each_top_level_statement'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb.rb:1004:in `eval_input'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb.rb:951:in `debug_readline'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb/debug/ui.rb:59:in `block in readline'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb/debug/ui.rb:78:in `block in setup_interrupt'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/debug-1.9.1/lib/debug/session.rb:1981:in `intercept_trap_sigint'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb/debug/ui.rb:71:in `setup_interrupt'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/irb-1.12.0/lib/irb/debug/ui.rb:57:in `readline'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/debug-1.9.1/lib/debug/session.rb:444:in `wait_command'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/debug-1.9.1/lib/debug/session.rb:404:in `block in wait_command_loop'
	from <internal:kernel>:187:in `loop'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/debug-1.9.1/lib/debug/session.rb:403:in `wait_command_loop'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/debug-1.9.1/lib/debug/session.rb:329:in `process_event'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/debug-1.9.1/lib/debug/session.rb:254:in `session_server_main'
	from /Users/tomoya.ishida/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/debug-1.9.1/lib/debug/session.rb:212:in `block in activate'

Result of irb_info

irb(main):001> irb_info
Ruby version: 3.3.0
IRB version: irb 1.12.0 (2024-03-06)
InputMethod: ReadlineInputMethod with Reline 0.4.3 and /Users/tomoya.ishida/.inputrc
Completion: RegexpCompletor
.irbrc paths: /Users/tomoya.ishida/.irbrc
RUBY_PLATFORM: arm64-darwin22
LANG env: ja_JP.UTF-8
East Asian Ambiguous Width: 1

Setting Files

.irbrc

IRB.conf[:USE_SINGLELINE] = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant