@@ -28,7 +28,8 @@ options = OpenStruct.new(
2828 'value_as_nested_element' => false ,
2929 'attach_mode' => false ,
3030 'cli_debug' => false ,
31- 'key_value_mode' => false
31+ 'key_value_mode' => false ,
32+ 'server_mode' => false
3233)
3334
3435opts = OptionParser . new do |opts |
8485 opts . on ( "--key-value" , "Key/Value presentation of hash items" ) do
8586 options . key_value_mode = true
8687 end
88+ opts . on ( "--server-mode" , "Tells that rdebug-ide is working in server mode" ) do
89+ options . server_mode = true
90+ end
8791 opts . on ( "--ignore-port" , "Generate another port" ) do
8892 options . ignore_port = true
8993 end
137141
138142if options . dispatcher_port != -1
139143 ENV [ 'IDE_PROCESS_DISPATCHER' ] = options . dispatcher_port . to_s
140- if RUBY_VERSION < "1.9"
141- lib_path = File . expand_path ( File . dirname ( __FILE__ ) + "/../lib/" )
142- $: << lib_path unless $:. include? lib_path
143- require 'ruby-debug-ide/multiprocess'
144- else
145- require_relative '../lib/ruby-debug-ide/multiprocess'
146- end
144+ Debugger . require_multiprocess
147145 Debugger ::MultiProcess . do_monkey
148146
149147 ENV [ 'DEBUGGER_STORED_RUBYLIB' ] = ENV [ 'RUBYLIB' ]
@@ -171,8 +169,11 @@ Debugger.inspect_time_limit = options.inspect_time_limit
171169Debugger . catchpoint_deleted_event = options . catchpoint_deleted_event || options . rm_protocol_extensions
172170Debugger . value_as_nested_element = options . value_as_nested_element || options . rm_protocol_extensions
173171Debugger . key_value_mode = options . key_value_mode
172+ Debugger . server_mode = options . server_mode
174173
175174if options . attach_mode
175+ Debugger . require_multiprocess
176+
176177 if Debugger ::FRONT_END == "debase"
177178 Debugger . init_variables
178179 end
0 commit comments