bin/rdebug-ide in debugger-xml-0.3.3 vs bin/rdebug-ide in debugger-xml-0.4.0

- old
+ new

@@ -10,18 +10,21 @@ class RdebugIde def initialize check_argv! - Debugger.const_set("ARGV", ARGV.clone) - Debugger.const_set("RDEBUG_SCRIPT", rdebug_path) - install_interruption_handler if options.int_handler - Debugger.tracing = options.tracing - Debugger.wait_for_start = options.wait_for_start - Debugger.wait_connection = true - Debugger.printer = Printers::Xml.new - Debugger.const_set("PROG_SCRIPT", ARGV.shift) + @proxy = DebuggerXml::DebuggerProxy.new + @proxy.set_argv(ARGV.clone) + @proxy.set_rdebug_script(rdebug_path) + @proxy.set_prog_script(ARGV.shift) + if options.int_handler + install_interruption_handler + end + @proxy.tracing = options.tracing + @proxy.printer = Printers::Xml.new + @proxy.wait_connection = true + DebuggerXml.wait_for_start = options.wait_for_start Debugger::Xml.logger = if options.debug_mode Debugger::Xml::Ide::Logger.new else Debugger::Xml::FakeLogger.new end @@ -57,10 +60,10 @@ exit(1) end end def install_interruption_handler - trap('INT') { Debugger.interrupt_last } + trap('INT') { @proxy.interrupt_last } end def rdebug_path File.expand_path($0).tap do |path| if RUBY_PLATFORM =~ /mswin/