Created
June 5, 2020 09:07
-
-
Save tonymarklove/ab6c056ab6f6cb35345ebc3559d157eb to your computer and use it in GitHub Desktop.
Pry - Jump up the stack to next application code, ignoring gems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Pry::Commands.command /^up_app$/, "jump up the stack to next application code" do | |
| start_frame = Byebug.current_context.frame.pos + 1 | |
| frame = (start_frame...Byebug.current_context.stack_size).find do |index| | |
| !Byebug::Frame.new(Byebug.current_context, index).file.start_with?(Gem.dir) | |
| end | |
| _pry_.run_command "frame #{frame}" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment