debug icon indicating copy to clipboard operation
debug copied to clipboard

Keystrokes between `debugger` sessions seem to persist

Open joshuay03 opened this issue 1 year ago • 11 comments

Your environment

  • ruby -v: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
  • rdbg -v: rdbg 1.9.2

Describe the bug

After hitting a debugger break point once, and using c to move on, if you hit Enter before the next break point, the next breakpoint is skipped.

To Reproduce

Script:

require "debug"; def my_method; 2.times { |i| p i; debugger; sleep 1 }; end

Without hitting Enter:

https://github.com/ruby/debug/assets/54629302/2c5779ef-a054-4db9-97d0-1f09eaf05e49

With hitting Enter during the first sleep:

https://github.com/ruby/debug/assets/54629302/808ccb30-456a-4888-9794-96f514f8189f

Expected behavior

The execution should stop at the next breakpoint regardless of what keystrokes are used between breakpoints.

Additional context

None.

joshuay03 avatar Apr 23 '24 23:04 joshuay03