Skip to content

Commit f24a6f9

Browse files
shunichiko1
authored andcommitted
Warn against debugging Process.daemon locally.
1 parent 699a31e commit f24a6f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/debug/session.rb

+8
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,10 @@ def active?
151151
!@q_evt.closed?
152152
end
153153

154+
def remote?
155+
@ui.remote?
156+
end
157+
154158
def stop_stepping? file, line, subsession_id = nil
155159
if @bps.has_key? [file, line]
156160
true
@@ -2427,6 +2431,10 @@ def daemon
24272431

24282432
_, child_hook = __fork_setup_for_debugger(:child)
24292433

2434+
unless SESSION.remote?
2435+
DEBUGGER__.warn "Can't debug the code after Process.daemon locally. Use the remote debugging feature."
2436+
end
2437+
24302438
super.tap do
24312439
child_hook.call
24322440
end

0 commit comments

Comments
 (0)