Closed wsny closed 9 years ago
Sorry, this actually seems to be a compatability thing with pry-byebug and pry-stack_explorer
This started with deivid-rodriguez/pry-byebug#55. pry-byebug now wants to handle moving around the frames now, but pry-rescue is trying to go around pry-byebug.
Here is an example where this is failing.
When I run
bundle exec rescue test.rb
and try to runup
to get up the stack, and I get:ArgumentError: uncaught throw :breakout_nav from /home/WilliamSnyders/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/pry-byebug-3.1.0/lib/pry/commands/frames.rb:73:in 'throw'
I've had some issues tracking this down, cause pry warn's on the error somewhere and I can't seem to get the full stacktrace for it (probably didn't try hard enough). Though I do think I might see why this is happening.
For whatever reason,
pry
is getting called here with a hash:https://github.com/ConradIrwin/pry-rescue/blob/master/lib/pry-rescue.rb#L58
Calling with the hash will call Pry with PryRescue instead of the binding of where the rescue happened
https://github.com/pry/pry/blob/master/lib/pry/core_extensions.rb#L41-L47
And doing that means that pry-byebug thinks it should not involved (only wants to work with Bindings)
https://github.com/deivid-rodriguez/pry-byebug/blob/master/lib/pry-byebug/pry_ext.rb#L7-L17
Which means we miss out on all the goodies of pry-byebug (like the catch for the :breakout_nav https://github.com/deivid-rodriguez/pry-byebug/blob/master/lib/byebug/processors/pry_processor.rb#L41)
Not sure why it was done this way, so didn't try to fix it myself.