Skip to content

Commit

Permalink
Change command 'continue_breakpoint' to 'skip_breakpoint'
Browse files Browse the repository at this point in the history
  • Loading branch information
renatocassino committed Jan 20, 2019
1 parent ff5a0ee commit 4967e5f
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 43 deletions.
73 changes: 37 additions & 36 deletions GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1441,42 +1441,43 @@ display a short list of named classes of commands
```bash
(byebug) help
break -- Sets breakpoints in the source code
catch -- Handles exception catchpoints
condition -- Sets conditions on breakpoints
continue -- Runs until program ends, hits a breakpoint or reaches a line
delete -- Deletes breakpoints
disable -- Disables breakpoints or displays
display -- Evaluates expressions every time the debugger stops
down -- Moves to a lower frame in the stack trace
edit -- Edits source files
enable -- Enables breakpoints or displays
finish -- Runs the program until frame returns
frame -- Moves to a frame in the call stack
help -- Helps you using byebug
history -- Shows byebug's history of commands
info -- Shows several informations about the program being debugged
interrupt -- Interrupts the program
irb -- Starts an IRB session
kill -- Sends a signal to the current process
list -- Lists lines of source code
method -- Shows methods of an object, class or module
next -- Runs one or more lines of code
pry -- Starts a Pry session
quit -- Exits byebug
restart -- Restarts the debugged program
save -- Saves current byebug session to a file
set -- Modifies byebug settings
show -- Shows byebug settings
source -- Restores a previously saved byebug session
step -- Steps into blocks or methods one or more times
thread -- Commands to manipulate threads
tracevar -- Enables tracing of a global variable
undisplay -- Stops displaying all or some expressions when program stops
untracevar -- Stops tracing a global variable
up -- Moves to a higher frame in the stack trace
var -- Shows variables and its values
where -- Displays the backtrace
break -- Sets breakpoints in the source code
catch -- Handles exception catchpoints
condition -- Sets conditions on breakpoints
continue -- Runs until program ends, hits a breakpoint or reaches a line
delete -- Deletes breakpoints
disable -- Disables breakpoints or displays
display -- Evaluates expressions every time the debugger stops
down -- Moves to a lower frame in the stack trace
edit -- Edits source files
enable -- Enables breakpoints or displays
finish -- Runs the program until frame returns
frame -- Moves to a frame in the call stack
help -- Helps you using byebug
history -- Shows byebug's history of commands
info -- Shows several informations about the program being debugged
interrupt -- Interrupts the program
irb -- Starts an IRB session
kill -- Sends a signal to the current process
list -- Lists lines of source code
method -- Shows methods of an object, class or module
next -- Runs one or more lines of code
pry -- Starts a Pry session
quit -- Exits byebug
restart -- Restarts the debugged program
save -- Saves current byebug session to a file
set -- Modifies byebug settings
show -- Shows byebug settings
skipbreakpoint -- Runs until the next breakpoint as long as it is different from the current one
source -- Restores a previously saved byebug session
step -- Steps into blocks or methods one or more times
thread -- Commands to manipulate threads
tracevar -- Enables tracing of a global variable
undisplay -- Stops displaying all or some expressions when program stops
untracevar -- Stops tracing a global variable
up -- Moves to a higher frame in the stack trace
var -- Shows variables and its values
where -- Displays the backtrace
```
Expand Down
2 changes: 1 addition & 1 deletion lib/byebug/commands.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require "byebug/commands/catch"
require "byebug/commands/condition"
require "byebug/commands/continue"
require "byebug/commands/continue_breakpoint"
require "byebug/commands/debug"
require "byebug/commands/delete"
require "byebug/commands/disable"
Expand All @@ -29,6 +28,7 @@
require "byebug/commands/save"
require "byebug/commands/set"
require "byebug/commands/show"
require "byebug/commands/skip_breakpoint"
require "byebug/commands/source"
require "byebug/commands/step"
require "byebug/commands/thread"
Expand Down
1 change: 1 addition & 0 deletions lib/byebug/commands/continue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def self.description
c[ont[inue]][ <line_number>]
#{short_description}
Normally the program stops at the next breakpoint. However, if the
parameter "unconditionally" is given or the command is suffixed with
"!", the program will run until the end regardless of any enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Byebug
# Allows the user to continue execution until the next breakpoint, if
# the breakpoint file or line be different, stop again
#
class ContinueBreakpointCommand < Command
class SkipBreakpointCommand < Command
include Helpers::ParseHelper

class << self
Expand All @@ -24,12 +24,12 @@ def file_path
end

def self.regexp
/^\s* c(?:ont(?:inue)?_)?(?:b(?:reak(?:point)?)?) \s*$/x
/^\s* s(?:kip_)?(?:b(?:reak(?:point)?)?) \s*$/x
end

def self.description
<<-DESCRIPTION
c[ont[inue]_]b[reak[point]]
s[kip_]b[reak[point]]
#{short_description}
DESCRIPTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Byebug
#
# Tests for continue command
#
class ContinueBreakpointTest < TestCase
class SkipBreakpointTest < TestCase
def program
strip_line_numbers <<-RUBY
1: module Byebug
Expand All @@ -32,13 +32,13 @@ def program
end

def test_continues_until_the_end_if_no_line_specified_and_no_breakpoints
enter "continue_breakpoint"
enter "skip_breakpoint"

debug_code(program) { assert_location example_path, 18 }
end

def test_works_in_abbreviated_mode_too
enter "cb"
enter "sb"

debug_code(program) { assert_location example_path, 18 }
end
Expand Down

0 comments on commit 4967e5f

Please sign in to comment.