diff --git a/GUIDE.md b/GUIDE.md index 4824cdabf..0e140f484 100644 --- a/GUIDE.md +++ b/GUIDE.md @@ -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 ``` diff --git a/lib/byebug/commands.rb b/lib/byebug/commands.rb index 7dddc5e3a..d42e753b7 100644 --- a/lib/byebug/commands.rb +++ b/lib/byebug/commands.rb @@ -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" @@ -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" diff --git a/lib/byebug/commands/continue.rb b/lib/byebug/commands/continue.rb index 3be135ebe..21330543b 100644 --- a/lib/byebug/commands/continue.rb +++ b/lib/byebug/commands/continue.rb @@ -22,6 +22,7 @@ def self.description c[ont[inue]][ ] #{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 diff --git a/lib/byebug/commands/continue_breakpoint.rb b/lib/byebug/commands/skip_breakpoint.rb similarity index 90% rename from lib/byebug/commands/continue_breakpoint.rb rename to lib/byebug/commands/skip_breakpoint.rb index 13c9a8cec..358b0415c 100644 --- a/lib/byebug/commands/continue_breakpoint.rb +++ b/lib/byebug/commands/skip_breakpoint.rb @@ -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 @@ -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 diff --git a/test/commands/continue_breakpoint_test.rb b/test/commands/skip_breakpoint_test.rb similarity index 91% rename from test/commands/continue_breakpoint_test.rb rename to test/commands/skip_breakpoint_test.rb index a26632866..8bae2422e 100644 --- a/test/commands/continue_breakpoint_test.rb +++ b/test/commands/skip_breakpoint_test.rb @@ -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 @@ -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