Skip to content

Commit

Permalink
Remove byebug debugging frames
Browse files Browse the repository at this point in the history
We use the same approach we use for skipping pry-debugger and pry-nav frames for byebug, we just match based on __FILE__

NOTE: There is more work to be done to ensure the callstack will continue to exist after stepping/nexting in byebug
  • Loading branch information
banister committed Feb 16, 2015
1 parent 5bec198 commit c2f5720
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pry-stack_explorer/when_started_hook.rb
Expand Up @@ -58,9 +58,9 @@ def remove_internal_frames(bindings)
bindings.drop(start_frame_index + 1)
end

# remove pry-nav / pry-debugger frames
# remove pry-nav / pry-debugger / pry-byebug frames
def remove_debugger_frames(bindings)
bindings.drop_while { |b| b.eval("__FILE__") =~ /pry-(?:nav|debugger)/ }
bindings.drop_while { |b| b.eval("__FILE__") =~ /pry-(?:nav|debugger|byebug)/ }
end

# binding.pry frame
Expand Down

0 comments on commit c2f5720

Please sign in to comment.