Class: Byebug::WhereCommand

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

Overview

Implements byebug “where” or “backtrace” command.

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

command_exists?, commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map, terminal_width

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



160
161
162
163
164
165
166
167
168
169
# File 'lib/byebug/commands/frame.rb', line 160

def description
  %{w[here]|bt|backtrace\tdisplay stack frames

    Print the entire stack frame. Each frame is numbered, the most recent
    frame is 0. Frame number can be referred to in the "frame" command;
    "up" and "down" add or subtract respectively to frame numbers shown.
    The position of the current frame is marked with -->. C-frames hang
    from their most inmediate ruby frame to indicate that they are not
    navigable}
end

.namesObject



156
157
158
# File 'lib/byebug/commands/frame.rb', line 156

def names
  %w(where backtrace)
end

Instance Method Details

#executeObject



151
152
153
# File 'lib/byebug/commands/frame.rb', line 151

def execute
  print_backtrace
end

#regexpObject



147
148
149
# File 'lib/byebug/commands/frame.rb', line 147

def regexp
  /^\s* (?:w(?:here)?|bt|backtrace) \s*$/x
end