Class: Debugger::WhereCommand

### Home Classes Methods

### In Files

- lib/ruby-debug/commands/frame.rb

### Parent

Debugger::Command

### Methods

- ::help
- ::help_command
- #execute
- #regexp

### Class/Module Index

Quicksearch

- Debugger
- Debugger::AddBreakpoint
- Debugger::Breakpoint
- Debugger::Context
- Debugger::ContinueCommand
- Debugger::DeleteBreakpointCommand
- Debugger::FinishCommand
- Debugger::HelpCommand
- Debugger::IRBCommand
- Debugger::InfoCommand
- Debugger::JumpCommand
- Debugger::KillCommand
- Debugger::ListCommand
- Debugger::LocalInterface
- Debugger::LocalInterface::Debugger
- Debugger::MethodCommand
- Debugger::MethodSigCommand
- Debugger::NextCommand
- Debugger::ParseFunctions
- Debugger::Processor
- Debugger::QuitCommand
- Debugger::ReloadCommand
- Debugger::SetCommand
- Debugger::ShowCommand
- Debugger::SkipCommand
- Debugger::SourceCommand
- Debugger::StepCommand
- Debugger::VarClassVarCommand
- Debugger::VarInheritCommand
- Debugger::VarLocalCommand
- Debugger::WhereCommand
- Printers
- Printers::Base
- Printers::Base::MissedArgument
- Printers::Base::MissedPath
- Printers::Plain
- Mocha
- Mocha::Call
- Mocha::Expectation
- Mocha::Mock
- MiniTest
- MiniTest::Assertions
- MiniTest::Expectations
- TestDsl
- TestDsl::ClassMethods
- TestDsl::Shared
- Kernel
- Module
- PrinterHelpers
- TestInterface

No matching classes.

# Debugger::WhereCommand

Implements debugger "where" or "backtrace" command.

### Public Class Methods

help(cmd) click to toggle source

    # File lib/ruby-debug/commands/frame.rb, line 151
          def help(cmd)
            s = if cmd == 'where'
              %{
                w[here]\tdisplay stack frames
              }
            else
              %{
                bt|backtrace\t\talias for where - display stack frames
              }
            end
            s += %{
    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 -->.  }
          end

help_command() click to toggle source

    # File lib/ruby-debug/commands/frame.rb, line 147
    def help_command
      %where backtrace|
    end

### Public Instance Methods

execute() click to toggle source

    # File lib/ruby-debug/commands/frame.rb, line 140
    def execute
      print(prc("frame.line", (0...@state.context.stack_size)) do |item, _|
        get_pr_arguments(item == @state.frame_pos, item, @state.context)
      end)
    end

regexp() click to toggle source

    # File lib/ruby-debug/commands/frame.rb, line 136
    def regexp
      /^\s*(?:w(?:here)?|bt|backtrace)$/
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.