Page the output in irb:rdbg sessions too#1043
Conversation
IRB started to page its evaluation output and it became a useful feature for users. However, in `irb:rdbg` sessions, the output is not paged so the sudden change in behavior is surprising and inconvenient. This commit makes `irb:rdbg` sessions page the output of the debugger too.
|
This input will launch the pager 3 times. irb:rdbg(main):025> outline Object.new.tap{|o|['a','b','c'].each{o.define_singleton_method(_1*10000){}}}This part calls # in DEBUGGER__::Session#process_event
output.each{|str| @ui.puts str} if ev != :suspendI think this is just an acceptable edge case. Maybe we can fix it in debug. |
|
Thanks for catching that. Since |
Actually not cause we need to have an |
(ruby/irb#1043) IRB started to page its evaluation output and it became a useful feature for users. However, in `irb:rdbg` sessions, the output is not paged so the sudden change in behavior is surprising and inconvenient. This commit makes `irb:rdbg` sessions page the output of the debugger too. ruby/irb@8241ec9a0c
|
Thanks for fixing this! I asked about this on the ruby-dx slack and was not effecting a solution this fast for it 😁 |
IRB started to page its evaluation output and it became a useful feature for users. However, in
irb:rdbgsessions, the output is not paged so the sudden change in behavior is surprising and inconvenient.This commit makes
irb:rdbgsessions page the output of the debugger too.Notes:
ThreadClient,Debug::UI#putswill always receive string. So we only need to activate pager in that case. In fact,debugmost of the time passes string to this method, except for when printing exception backtrace.