Skip to content

Conversation

ono-max
Copy link
Member

@ono-max ono-max commented Jun 25, 2022

Debugger doesn't work after stopping record once as follows:

$ exe/rdbg g.rb
[1, 6] in g.rb
=>   1| a=1
     2|
     3| b=1
     4|
     5| c=1
     6| p a
=>#0	<main> at g.rb:1
(rdbg) record on    # command
Recorder for #<Thread:0x000000013007bc60 run>: on (0 records)
(rdbg) record off    # command
Recorder for #<Thread:0x000000013007bc60 run>: off
(rdbg) record on    # command
Recorder for #<Thread:0x000000013007bc60 run>: off
(rdbg) b 5    # break command
#0  BP - Line  /Users/s15236/workspace/debug/g.rb:5 (line)
(rdbg) c    # continue command
[1, 6] in g.rb
     1| a=1
     2|
     3| b=1
     4|
=>   5| c=1
     6| p a
=>#0	<main> at g.rb:5

Stop by #0  BP - Line  /Users/s15236/workspace/debug/g.rb:5 (line)
(rdbg) step back    # command
Can not step back more.

Expected behavior

$ exe/rdbg g.rb
[1, 6] in g.rb
=>   1| a=1
     2|
     3| b=1
     4|
     5| c=1
     6| p a
=>#0	<main> at g.rb:1
(rdbg) record on    # command
Recorder for #<Thread:0x000000014487bc58 run>: on (0 records)
(rdbg) b 5    # break command
#0  BP - Line  /Users/s15236/workspace/debug/g.rb:5 (line)
(rdbg) c    # continue command
[1, 6] in g.rb
     1| a=1
     2|
     3| b=1
     4|
=>   5| c=1
     6| p a
=>#0	<main> at g.rb:5

Stop by #0  BP - Line  /Users/s15236/workspace/debug/g.rb:5 (line)
(rdbg) step back    # command
[replay] [1, 6] in g.rb
[replay]      1| a=1
[replay]      2|
[replay]      3| b=1
[replay]      4|
[replay] =>   5| c=1
[replay]      6| p a
[replay] =>#0	<main> at g.rb:5
Really quit? [Y/n] 1D

@st0012
Copy link
Member

st0012 commented Jun 25, 2022

Can you add a test for it? It can just be the example in the description. Thx

@ko1 ko1 merged commit ba97f63 into ruby:master Jul 5, 2022
@ono-max ono-max deleted the patch-2 branch July 5, 2022 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants