Module: Kernel

Defined in:
lib/byebug.rb

Instance Method Summary collapse

Instance Method Details

#byebug(steps_into = 1, steps_out = 2) ⇒ Object

Enters byebug after steps_into line events and steps_out return events occur. Before entering byebug startup, the init script is read.



214
215
216
217
218
219
220
221
# File 'lib/byebug.rb', line 214

def byebug(steps_into = 1, steps_out = 2)
  Byebug.start
  Byebug.run_init_script(StringIO.new)
  if Byebug.current_context.stack_size > 2
    Byebug.current_context.stop_return steps_out if steps_out >= 1
  end
  Byebug.current_context.step_into steps_into if steps_into >= 0
end