Class: Byebug::StepCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/byebug/commands/stepping.rb

Overview

Implements byebug “step” command.

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

.descriptionObject



67
68
69
70
71
72
73
# File 'lib/byebug/commands/stepping.rb', line 67

def description
  %{
    s[tep][+-]?[ nnn]\tstep (into methods) once or nnn times
    \t\t'+' forces to move to another line.
    \t\t'-' is the opposite of '+' and disables the :forcestep setting.
   }
end

.namesObject



63
64
65
# File 'lib/byebug/commands/stepping.rb', line 63

def names
  %w(step)
end

Instance Method Details

#executeObject



55
56
57
58
59
60
# File 'lib/byebug/commands/stepping.rb', line 55

def execute
  steps, force = parse_stepping_args("Step", @match)
  return unless steps
  @state.context.step_into steps, force
  @state.proceed
end

#regexpObject



51
52
53
# File 'lib/byebug/commands/stepping.rb', line 51

def regexp
  /^\s* s(?:tep)?([+-]) ?(?:\s+(\S+))? \s*$/x
end