Module: Kernel

Defined in:
lib/byebug/attacher.rb

Overview

Adds a ‘byebug` method to the Kernel module.

Dropping a ‘byebug` call anywhere in your code, you get a debug prompt.

Instance Method Summary collapse

Instance Method Details

#byebug(steps_out = 1, before = true) ⇒ Object Also known as: debugger

Enters byebug right before (or right after if before is false) return events occur. Before entering byebug the init script is read.



16
17
18
19
20
# File 'lib/byebug/attacher.rb', line 16

def byebug(steps_out = 1, before = true)
  Byebug.start
  Byebug.run_init_script(StringIO.new)
  Byebug.current_context.step_out(steps_out, before)
end