Class: Byebug::ContinueCommand
- Defined in:
- lib/byebug/commands/continue.rb
Overview
Implements the continue command.
Allows the user to continue execution until the next stopping point, a specific line number or until program termination.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, #match
Methods included from StringFunctions
Methods included from FileFunctions
#get_line, #get_lines, #n_lines, #normalize
Methods included from ParseFunctions
#get_int, #parse_steps, #syntax_valid?, #without_stderr
Constructor Details
This class inherits a constructor from Byebug::Command
Class Method Details
.description ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/byebug/commands/continue.rb', line 36 def description prettify <<-EOD c[ont[inue]][ <n>] Run until program ends, hits a breakpoint or reaches line <n>. EOD end |
.names ⇒ Object
32 33 34 |
# File 'lib/byebug/commands/continue.rb', line 32 def names %w(continue) end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/byebug/commands/continue.rb', line 15 def execute if @match[1] num, err = get_int(@match[1], 'Continue', 0, nil) return errmsg(err) unless num filename = File.(@state.file) unless Breakpoint.potential_line?(filename, num) return errmsg(pr('continue.errors.unstopped_line', line: num)) end Breakpoint.add(filename, num) end @state.proceed end |
#regexp ⇒ Object
11 12 13 |
# File 'lib/byebug/commands/continue.rb', line 11 def regexp /^\s* c(?:ont(?:inue)?)? (?:\s+(\S+))? \s*$/x end |