Skip to content

Conversation

afn
Copy link

@afn afn commented Sep 22, 2023

See ConradIrwin/pry-rescue#124 --- pry-byebug doesn't play nicely with pry-rescue. pry-rescue works by capturing the call stack, and later invoking pry using that call stack (not the current one) as the target.

I think the correct fix would be to allow ByeBug::PryProcessor.start (called from here) to receive a target and use that to initialize the context of byebug. But there doesn't seem to be an easy way to modify byebug to operate within an arbitrary call stack.

So as a workaround for now, just disable the use of byebug when pry was entered via pry-rescue. We can detect this by the presence of the save_captured_exception hook.

See ConradIrwin/pry-rescue#124 --- pry-byebug
doesn't play nicely with pry-rescue. Detect if we're in a rescued
exception, and if so, use pry without byebug.
@rgaufman
Copy link

Please merge

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

Successfully merging this pull request may close these issues.

2 participants