Class: Byebug::WhereCommand

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

Overview

Show current backtrace.

Class Method Summary collapse

Instance Method Summary collapse

Methods included from FrameFunctions

#adjust_frame, #get_pr_arguments, #navigate_to_frame, #switch_to_frame

Methods inherited from Command

commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, #match

Methods included from StringFunctions

#camelize, #prettify

Methods included from FileFunctions

#get_line, #get_lines, #n_lines, #normalize

Methods included from ParseFunctions

#get_int, #parse_steps, #syntax_valid?

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject


85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/byebug/commands/frame.rb', line 85

def description
  prettify <<-EOD
    w[here]|bt|backtrace        Display stack frames.

    Print the entire stack frame. Each frame is numbered; the most recent
    frame is 0. A 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 immediate Ruby frame to indicate that they are not
    navigable.
  EOD
end

.namesObject


81
82
83
# File 'lib/byebug/commands/frame.rb', line 81

def names
  %w(where backtrace bt)
end

Instance Method Details

#executeObject


76
77
78
# File 'lib/byebug/commands/frame.rb', line 76

def execute
  print_backtrace
end

#regexpObject


72
73
74
# File 'lib/byebug/commands/frame.rb', line 72

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