Module: Kernel
- Defined in:
- lib/ruby-debug.rb
Instance Method Summary collapse
-
#binding_n(n = 0) ⇒ Object
Returns a binding of n-th call frame.
-
#debugger(steps = 1) ⇒ Object
Stops the current thread after a number of steps made.
Instance Method Details
#binding_n(n = 0) ⇒ Object
Returns a binding of n-th call frame
210 211 212 213 214 |
# File 'lib/ruby-debug.rb', line 210 def binding_n(n = 0) frame = Debugger.current_context.frames[n+1] raise "Unknown frame #{n}" unless frame frame.binding end |
#debugger(steps = 1) ⇒ Object
Stops the current thread after a number of steps made.
203 204 205 |
# File 'lib/ruby-debug.rb', line 203 def debugger(steps = 1) Debugger.current_context.stop_next = steps end |