Skip to content

Commit

Permalink
Stop byebug by exit or quit
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Oct 27, 2015
1 parent b33716b commit 6a81a06
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/pry-byebug/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
require 'pry-byebug/commands/down'
require 'pry-byebug/commands/frame'
require 'pry-byebug/commands/breakpoint'
require 'pry-byebug/commands/exit_all'
14 changes: 14 additions & 0 deletions lib/pry-byebug/commands/exit_all.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module PryByebug
#
# Exit pry REPL with Byebug.stop
#
class ExitAllCommand < Pry::Command::ExitAll
def process
super
ensure
Byebug.stop if Byebug.stoppable?
end
end
end

Pry::Commands.add_command(PryByebug::ExitAllCommand)

0 comments on commit 6a81a06

Please sign in to comment.