Module: Kernel
- Defined in:
- lib/trepanning.rb
Instance Method Summary collapse
-
#debugger(steps = 1) ⇒ Object
(also: #breakpoint)
Enters the debugger in the current thread after steps line events occur.
Instance Method Details
#debugger(steps = 1) ⇒ Object Also known as: breakpoint
Enters the debugger in the current thread after steps line events occur. Before entering the debugger startup script is read.
Setting steps to 0 will cause a break in the debugger subroutine and not wait for a line event to occur. You will have to go “up 1” in order to be back in your debugged program rather than the debugger. Settings steps to 0 could be useful you want to stop right after the last statement in some scope, because the next step will take you out of some scope.
277 278 279 280 281 282 283 284 285 |
# File 'lib/trepanning.rb', line 277 def debugger(steps = 1) Trepan.start unless Trepan.started? Trepan.add_startup_files if 0 == steps Debugger.current_context.stop_frame = 0 else Debugger.current_context.stop_next = steps end end |