gsamokovarov/break

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

Closed this issue · 1 comments

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'

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.