Sha256: 0cf80f5affb76b4e26fdd3bf1683234e329b3648b45bc1edc4f28f800cf84ba3

Contents?: true

Size: 632 Bytes

Versions: 1

Compression:

Stored size: 632 Bytes

Contents

#
# Main Container for all of Byebug's code
#
module Byebug
  #
  # Enters byebug right before (or right after if _before_ is false) return
  # events occur. Before entering byebug the init script is read.
  #
  def self.attach
    return errmsg('Byebug already started. Ignoring `byebug` call.') if started?

    setup_cmd_line_args

    start
    run_init_script

    current_context.step_out(2, true)
  end
end

#
# Adds a `byebug` method to the Kernel module.
#
# Dropping a `byebug` call anywhere in your code, you get a debug prompt.
#
module Kernel
  def byebug
    Byebug.attach
  end

  alias_method :debugger, :byebug
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
byebug-4.0.4 lib/byebug/attacher.rb