Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing enter without explicit command causes irb to continue past breakpoint #1002

Closed
mattbrictson opened this issue Sep 6, 2024 · 2 comments

Comments

@mattbrictson
Copy link

Description

When using binding.irb, if I explicitly type continue to continue past a first breakpoint, then pressing enter by itself will continue past the next breakpoint. I expect pressing enter should just insert a newline (i.e. increment the irb prompt).

As you can see in the video below, pressing enter after reaching the first breakpoint just increments the irb prompt, as expected.

However, upon reaching the second breakpoint, pressing enter immediately causes the interpreter to continue past the breakpoint. This is not expected.

Untitled.mov

Result of irb_info

irb(main):001> irb_info
Ruby version: 3.3.5
IRB version: irb 1.14.0 (2024-07-06)
InputMethod: RelineInputMethod with Reline 0.5.10 and /Users/mbrictson/.inputrc
Completion: Autocomplete, RegexpCompletor
RUBY_PLATFORM: arm64-darwin23
LANG env: en_US.UTF-8
East Asian Ambiguous Width: 1

Terminal Emulator

macOS Terminal (macOS Sonoma 14.6.1)

Setting Files

~/.irbrc - None

~/.inputrc

"\e[A": history-search-backward
"\e[B": history-search-forward
$if Bash
  Space: magic-space
$endif
set completion-ignore-case on
set completion-map-case on
set match-hidden-files off
set show-all-if-ambiguous on
set colored-stats on
@st0012
Copy link
Member

st0012 commented Sep 6, 2024

It's related to a requested feature: #856

For context, this is what ruby/debug does: inserting empty input after stepping commands like step, next, and continue, will repeat the previous command.

And IRB's continue command, along with other debugging commands, are simply shortcuts to start an irb:rdbg session, which is essentially a ruby/debug running IRB as its REPL. So in those sessions we decided to mimic the above behaviour.

@mattbrictson
Copy link
Author

Ah, I see. It is working as intended then. Thanks for explaining! I'll close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants