Skip to content

Commit

Permalink
Warn against debugging Process.daemon locally.
Browse files Browse the repository at this point in the history
  • Loading branch information
shunichi authored and ko1 committed Dec 2, 2022
1 parent 699a31e commit f24a6f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/debug/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ def active?
!@q_evt.closed?
end

def remote?
@ui.remote?
end

def stop_stepping? file, line, subsession_id = nil
if @bps.has_key? [file, line]
true
Expand Down Expand Up @@ -2427,6 +2431,10 @@ def daemon

_, child_hook = __fork_setup_for_debugger(:child)

unless SESSION.remote?
DEBUGGER__.warn "Can't debug the code after Process.daemon locally. Use the remote debugging feature."
end

super.tap do
child_hook.call
end
Expand Down

0 comments on commit f24a6f9

Please sign in to comment.