-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
24 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
if ENV['RUBY_DEBUG_LAZY'] | ||
require_relative 'debug/prelude' | ||
else | ||
require_relative 'debug/session' | ||
return unless defined?(DEBUGGER__) | ||
DEBUGGER__::start no_sigint_hook: true, nonstop: true | ||
require_relative 'debug/prelude' | ||
|
||
module DEBUGGER__ | ||
def self.step_in(&block) | ||
require "debug/session" | ||
|
||
# If session.rb doesn't early return, we can then call the method it defines. | ||
if defined?(Session) | ||
start no_sigint_hook: true, nonstop: true | ||
step_in(&block) | ||
# Otherwise, we call the block without stepping in. | ||
else | ||
yield | ||
end | ||
end | ||
|
||
def self.start(**kw) | ||
require "debug/session" | ||
|
||
# If session.rb doesn't early return, we can then call the method it defines. | ||
if defined?(Session) | ||
start(**kw) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters