Skip to content

Commit 7316d97

Browse files
committed
Merge pull request #31 from os97673/pass-debug-mode-to-children
Need to pass cli_debug flag to a child process
2 parents afb9bb2 + acf999f commit 7316d97

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

bin/rdebug-ide

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ if options.dispatcher_port != -1
9595
old_opts = ENV['RUBYOPT']
9696
ENV['RUBYOPT'] = "-r#{File.expand_path(File.dirname(__FILE__))}/../lib/ruby-debug-ide/multiprocess/starter"
9797
ENV['RUBYOPT'] += " #{old_opts}" if old_opts
98+
ENV['DEBUGGER_CLI_DEBUG'] = Debugger.cli_debug
9899
end
99100

100101
if options.int_handler

lib/ruby-debug-ide/multiprocess/pre_child.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ def pre_child
1616
'port' => port,
1717
'stop' => false,
1818
'tracing' => false,
19-
'int_handler' => true
19+
'int_handler' => true,
20+
'cli_debug' => (ENV['DEBUGGER_CLI_DEBUG'] == 'true')
2021
)
2122

2223
acceptor_host, acceptor_port = ENV['IDE_PROCESS_DISPATCHER'].split(":")
@@ -56,6 +57,7 @@ def start_debugger(options)
5657
# set options
5758
Debugger.keep_frame_binding = options.frame_bind
5859
Debugger.tracing = options.tracing
60+
Debugger.cli_debug = options.cli_debug
5961

6062
Debugger.prepare_debugger(options)
6163
end

0 commit comments

Comments
 (0)