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

What to use instead of continue when coming from pry-byebug? #10

Closed
technicalpickles opened this issue Oct 26, 2021 · 1 comment
Closed

Comments

@technicalpickles
Copy link

I moved our app from pry-byebug to break after running into issues between it and zeitwerk, as documented at deivid-rodriguez/byebug#564

The only issue we've had is that people are used to running continue to keep executing it, and some have c aliased to it.

I believe that it's comparable to just doing exit to leave the current pry, but I wanted to get a second opionion. If that's the case, it should be possible to do something like:

  Pry.commands.alias_command 'continue', 'exit'
@gsamokovarov
Copy link
Owner

Yes, Pry.commands.alias_command 'continue', 'exit' should do the trick as exit quits the current session. Break's navigation command don't run in the same session like pry's internal cd command for example. They all quit the current session and start a new one when they land on the point they need debug so pry's exit is fine for a continue command.

I tried to stay away from shortcut commands for break's interface so I don't interfere with short local variable names but for the pry integration, next, step, up and down are regular commands and you can shortcut them with Pry.commands.alias_command too. If you folks miss other shortcuts like s or n, you can add them as well:

Pry.commands.alias_command 'continue', 'exit'
Pry.commands.alias_command 'c', 'exit'

# If you want to...
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 's', 'step'

In closing, I'd like to apologize for the state of Break at the moment. A lot of life happened to me during the last two years and I haven't been able to give it the attention it deserves. https://github.com/ruby/debug may be a better and more maintained alternative.

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

No branches or pull requests

2 participants