Module: Kernel
- Defined in:
- lib/byebug.rb
Instance Method Summary collapse
-
#byebug(steps = 1) ⇒ Object
(also: #breakpoint)
Enters byebug after steps line events occur.
Instance Method Details
#byebug(steps = 1) ⇒ Object Also known as: breakpoint
Enters byebug after steps line events occur.
Before entering byebug startup, the init script is read. Setting steps to 0 will cause a break in byebug’s subroutine and not wait for a line event to occur. You will have to go “up 1” in order to be back to your debugged program from byebug. Setting steps to 0 could be useful if you want to stop right after the last statement in some scope, because the next step will take you out of some scope.
263 264 265 266 267 268 269 270 271 |
# File 'lib/byebug.rb', line 263 def byebug(steps = 1) Byebug.start Byebug.run_init_script(StringIO.new) if 0 == steps Byebug.context.step_out else Byebug.context.step_into steps end end |