Class: Byebug::ContinueCommand
- Includes:
- Helpers::ParseHelper
- 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.
Instance Attribute Summary
Attributes inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Helpers::ParseHelper
#get_int, #parse_steps, #syntax_valid?
Methods inherited from Command
#arguments, columnize, #context, #frame, help, #initialize, match, to_s
Methods included from Helpers::StringHelper
Constructor Details
This class inherits a constructor from Byebug::Command
Class Method Details
.description ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/byebug/commands/continue.rb', line 18 def self.description <<-EOD c[ont[inue]][ <line_number>] #{short_description} EOD end |
.regexp ⇒ Object
14 15 16 |
# File 'lib/byebug/commands/continue.rb', line 14 def self.regexp /^\s* c(?:ont(?:inue)?)? (?:\s+(\S+))? \s*$/x end |
.short_description ⇒ Object
26 27 28 |
# File 'lib/byebug/commands/continue.rb', line 26 def self.short_description 'Runs until program ends, hits a breakpoint or reaches a line' end |
Instance Method Details
#execute ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/byebug/commands/continue.rb', line 30 def execute if @match[1] num, err = get_int(@match[1], 'Continue', 0, nil) return errmsg(err) unless num filename = File.(frame.file) unless Breakpoint.potential_line?(filename, num) return errmsg(pr('continue.errors.unstopped_line', line: num)) end Breakpoint.add(filename, num) end processor.proceed! Byebug.stop if Byebug.stoppable? end |