Module: Kernel

### Home Classes Methods

### In Files

- lib/ruby-debug-base.rb
- lib/ruby-debug.rb

### Methods

- #binding_n
- #breakpoint
- #debugger

### 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.

# Kernel

### Public Instance Methods

binding_n(n = 0) click to toggle source

Returns a binding of n-th call frame

    # File lib/ruby-debug-base.rb, line 255
    def binding_n(n = 0)
      Debugger.skip do
        if RUBY_VERSION < "1.9"
          Debugger.current_context.frame_binding(n+2)
        else
          Debugger.current_context.frame_binding(n+1)
        end
      end
    end

breakpoint(steps = 1, &block) click to toggle source
Alias for: debugger
debugger(steps = 1, &block) click to toggle source

If a block is given (and the debugger hasn't been started, we run the block under the debugger. Alas, when a block is given, we can't support running the startup script or support the steps option. FIXME.

    # File lib/ruby-debug-base.rb, line 237
    def debugger(steps = 1, &block)
      if block
        Debugger.start({}, &block)
      else
        Debugger.start unless Debugger.started?
        Debugger.run_init_script(StringIO.new)
        if 0 == steps
          Debugger.current_context.stop_frame = 0
        else
          Debugger.current_context.stop_next = steps
        end
      end
    end

Also aliased as: breakpoint, breakpoint

[Validate]

Generated with the Darkfish Rdoc Generator 2.