Class: Byebug::StepCommand
- Defined in:
- lib/byebug/commands/stepping.rb
Overview
Implements the step functionality.
Allows the user the continue execution until the next instruction, possibily in a different frame. Use step to step into method calls or blocks.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Command
commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match
Constructor Details
This class inherits a constructor from Byebug::Command
Class Method Details
.description ⇒ Object
80 81 82 83 84 85 86 |
# File 'lib/byebug/commands/stepping.rb', line 80 def description %{s[tep][+-]?[ nnn] Steps (into methods) once or nnn times. '+' forces to move to another line. '-' is the opposite of '+' and disables the :forcestep setting.} end |
.names ⇒ Object
76 77 78 |
# File 'lib/byebug/commands/stepping.rb', line 76 def names %w(step) end |
Instance Method Details
#execute ⇒ Object
67 68 69 70 71 72 73 |
# File 'lib/byebug/commands/stepping.rb', line 67 def execute steps, err = parse_steps(@match[2], 'Steps') return errmsg(err) unless steps @state.context.step_into(steps, parse_force(@match[1])) @state.proceed end |
#regexp ⇒ Object
63 64 65 |
# File 'lib/byebug/commands/stepping.rb', line 63 def regexp /^\s* s(?:tep)?([+-]) ?(?:\s+(\S+))? \s*$/x end |