Sha256: f5e56155e71e146671f399307406c9d4c043d72a9c5efd30e7e5db348758cda5

Contents?: true

Size: 613 Bytes

Versions: 6

Compression:

Stored size: 613 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
    require 'byebug/core'

    unless started?
      self.mode = :attached

      start
      run_init_script
    end

    current_context.step_out(3, 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

6 entries across 6 versions & 1 rubygems

Version Path
byebug-8.2.1 lib/byebug/attacher.rb
byebug-8.2.0 lib/byebug/attacher.rb
byebug-8.1.0 lib/byebug/attacher.rb
byebug-8.0.1 lib/byebug/attacher.rb
byebug-8.0.0 lib/byebug/attacher.rb
byebug-7.0.0 lib/byebug/attacher.rb