Conversation
Instead of adding `#ruby` on the right of input Ruby expressions, this patch changes the prompt to the `ruby`. This patch can relax issue about #538
| end | ||
|
|
||
| def frame_eval_core src, b | ||
| saved_target_frames = @target_frames |
There was a problem hiding this comment.
Doesn't this mean only 1 level of nesting is allowed?
There was a problem hiding this comment.
please report if you have an suspicious case.
There was a problem hiding this comment.
ok I can see it works even with 3 level of nesting
Stop by #2 BP - Method Foo.baz at test.rb:11
(rdbg) bt # backtrace command
=>#0 Foo.baz at test.rb:12
#1 Foo.bar at (rdbg)/test.rb:1
#2 [C] Binding#eval at ~/projects/debug/lib/debug/thread_client.rb:369
#3 TracePoint.allow_reentry at <internal:trace_point>:151
#4 Foo.bar at test.rb:8
#5 Foo.foo at (rdbg)/test.rb:1
#6 [C] Binding#eval at ~/projects/debug/lib/debug/thread_client.rb:369
#7 TracePoint.allow_reentry at <internal:trace_point>:151
#8 Foo.foo at test.rb:4
#9 <main> at (rdbg)/test.rb:1
#10 [C] Binding#eval at ~/projects/debug/lib/debug/thread_client.rb:369
#11 TracePoint.allow_reentry at <internal:trace_point>:151
#12 <main> at test.rb:17
(rdbg) c # continue command
30
(rdbg) bt # backtrace command
=>#0 Foo.bar at test.rb:8
#1 Foo.foo at (rdbg)/test.rb:1
#2 [C] Binding#eval at ~/projects/debug/lib/debug/thread_client.rb:369
#3 TracePoint.allow_reentry at <internal:trace_point>:151
#4 Foo.foo at test.rb:4
#5 <main> at (rdbg)/test.rb:1
#6 [C] Binding#eval at ~/projects/debug/lib/debug/thread_client.rb:369
#7 TracePoint.allow_reentry at <internal:trace_point>:151
#8 <main> at test.rb:17
(rdbg) c # continue command
20
(rdbg) bt # backtrace command
=>#0 Foo.foo at test.rb:4
#1 <main> at (rdbg)/test.rb:1
#2 [C] Binding#eval at ~/projects/debug/lib/debug/thread_client.rb:369
#3 TracePoint.allow_reentry at <internal:trace_point>:151
#4 <main> at test.rb:17
(rdbg) c # continue command
10
(rdbg) bt # backtrace command
=>#0 <main> at test.rb:17
(rdbg)
one question though: should these frames be displayed?
#2 [C] Binding#eval at ~/projects/debug/lib/debug/thread_client.rb:369
#3 TracePoint.allow_reentry at <internal:trace_point>:151
There was a problem hiding this comment.
ah, it's to store the information in the current frame with local variables. I get it now.
There was a problem hiding this comment.
one question though: should these frames be displayed?
I don't think so. But eliminating them are not easy task and it is trivial (maybe it is rare to use nested breaks) so I left it.
There was a problem hiding this comment.
I actually think it's easy to trigger nested breakpoints, but perhaps not intentionally. For example, having a catch StandardError first and make a typo in the REPL. I can even imagine people complaining about that 😂
15f918e to
9f8effa
Compare
fix #563