# class Byebug::WhereCommand

Show current backtrace.

### Public Class Methods

description() click to toggle source

    # 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

names() click to toggle source

    # File lib/byebug/commands/frame.rb, line 81
    def names
      %w(where backtrace bt)
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/byebug/commands/frame.rb, line 76
    def execute
      print_backtrace
    end

regexp() click to toggle source

    # File lib/byebug/commands/frame.rb, line 72
    def regexp
      /^\s* (?:w(?:here)?|bt|backtrace) \s*$/x
    end

### Private Instance Methods

print_backtrace() click to toggle source

    # File lib/byebug/commands/frame.rb, line 101
    def print_backtrace
      bt = prc('frame.line', (0...@state.context.stack_size)) do |_, index|
        get_pr_arguments(index)
      end

      print(bt)
    end