You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keystrokes between debugger sessions seem to persist #1098
I think it was introduced here. And there's this related follow-up issue.
I think a sensible middle ground would be to skip the repeat functionality on enter / empty line until the prompt is displaying. Or discard empty line input altogether until then.
@ko1 What do you think about an option where Rails could turn off this repeater behavior? Right now ruby/debug is not all that usable in Rails because of this issue.
I made patches for 1 and 2. 1 seems aggressive, but I'll try to merge.
2 is conservative approach, so no problem to introduce (RUBY_DEBUG_NO_REPEAT or no_repeat option).
BTW, I confirmed that:
a. pry behaves similar (typed "foo" while sleeping appears on the prompt) , but pry doesn't have repeating previous command with white space, there is no same issue.
b. gdb behaves similar and has same issue.
Activity
[-]Keystrokes between debug sessions seem to persist[/-][+]Keystrokes between `debugger` sessions seem to persist[/+]ko1 commentedon Apr 24, 2024
wow I see... Should we consume all input before REPL?
ko1 commentedon Apr 24, 2024
advices are very welcome If someone knows a techniques about it on other implementations
joshuay03 commentedon Apr 24, 2024
Hmm possibly, is that considered unconventional? Might be worth looking at how
pryhandles this.Or maybe just ignore previous REPL if in-between sessions.
joshuay03 commentedon Apr 24, 2024
The source of the issue:
debug/lib/debug/session.rb
Lines 1146 to 1152 in 0b77e82
mattkuras commentedon Aug 30, 2024
I too recently encountered this same issue. makes it hard to clear extra lines in the console
dhh commentedon Sep 9, 2024
Been seeing the same issue. This didn't use to be the case. Maybe we can track down when this started?
joshuay03 commentedon Sep 21, 2024
I think it was introduced here. And there's this related follow-up issue.
I think a sensible middle ground would be to skip the repeat functionality on enter / empty line until the prompt is displaying. Or discard empty line input altogether until then.
dhh commentedon Oct 4, 2024
@ko1 What do you think about an option where Rails could turn off this repeater behavior? Right now ruby/debug is not all that usable in Rails because of this issue.
Fix skipping next breakpoint unexpectedly
ko1 commentedon Jun 4, 2025
Sorry for long absent.
I have two options.
$stdinjust before printing prompt.I made patches for 1 and 2. 1 seems aggressive, but I'll try to merge.
2 is conservative approach, so no problem to introduce (
RUBY_DEBUG_NO_REPEATorno_repeatoption).BTW, I confirmed that:
a. pry behaves similar (typed "foo" while sleeping appears on the prompt) , but pry doesn't have repeating previous command with white space, there is no same issue.
b. gdb behaves similar and has same issue.
`no_repeat` option
`no_repeat` option
ko1 commentedon Jun 13, 2025
For 1, I found that the patch makes failure on remote debugging features.
joshuay03 commentedon Jun 20, 2025
Thank you @ko1, it seems we can close this issue off in that case?
@dhh I opened rails/rails#55214 if we want to enable the config option in new Rails apps.
dhh commentedon Aug 24, 2025
When would you not want to have the no repeat thing on? I'd very much prefer if Rails could just run with the default Debug options in place.,