From eaa307b8522ac61fdfedf6613f473b28a7bd53fc Mon Sep 17 00:00:00 2001 From: Andrea Ercolino Date: Fri, 17 Sep 2010 22:38:16 +0200 Subject: [PATCH 1/3] fix - properly initialize host + remove old reference to previous ruby-debug-ide the host variable was used before resetting it to a default value when empty; reference to ruby-debug-ide 0.4.9 was very misleading --- lib/ruby-debug-ide.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ruby-debug-ide.rb b/lib/ruby-debug-ide.rb index 1ee535b..433d34a 100644 --- a/lib/ruby-debug-ide.rb +++ b/lib/ruby-debug-ide.rb @@ -137,10 +137,10 @@ def start_control(host, port) return if @control_thread @control_thread = DebugThread.new do begin - $stderr.printf "Fast Debugger (ruby-debug-ide 0.4.9) listens on #{host}:#{port}\n" # 127.0.0.1 seemingly works with all systems and with IPv6 as well. - # "localhost" and nil on have problems on some systems. + # "localhost" and nil have problems on some systems. host ||= '127.0.0.1' + $stderr.printf "Fast Debugger (ruby-debug-ide19) listens on #{host}:#{port}\n" server = TCPServer.new(host, port) while (session = server.accept) begin From 5e46b4d0aec315b2f4a6f27be5ec82578bcf02c4 Mon Sep 17 00:00:00 2001 From: Andrea Ercolino Date: Fri, 17 Sep 2010 22:51:27 +0200 Subject: [PATCH 2/3] fix - netbeans 6.9.1 seems to need an absolute path for debugging rails 3.0.0 this could be a netbeans issue, but it's apparently easier to fix it here --- bin/rdebug-ide | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/rdebug-ide b/bin/rdebug-ide index 4ebb1b2..beaf611 100644 --- a/bin/rdebug-ide +++ b/bin/rdebug-ide @@ -75,7 +75,8 @@ if ARGV.empty? end # save script name -Debugger::PROG_SCRIPT = ARGV.shift +script = ARGV.shift +Debugger::PROG_SCRIPT = (script == 'script/rails' ? Dir.pwd + '/' : '') + script # install interruption handler trap('INT') { Debugger.interrupt_last } From 85b0f348de56ac8342e4eb7bea0a80c882c99de9 Mon Sep 17 00:00:00 2001 From: Andrea Ercolino Date: Fri, 17 Sep 2010 23:39:47 +0200 Subject: [PATCH 3/3] fix - use a regular expression to take care of folder separator --- bin/rdebug-ide | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/rdebug-ide b/bin/rdebug-ide index beaf611..9ce12f2 100644 --- a/bin/rdebug-ide +++ b/bin/rdebug-ide @@ -76,7 +76,7 @@ end # save script name script = ARGV.shift -Debugger::PROG_SCRIPT = (script == 'script/rails' ? Dir.pwd + '/' : '') + script +Debugger::PROG_SCRIPT = (script =~ /script([\\\/])rails/ ? Dir.pwd + $1 : '') + script # install interruption handler trap('INT') { Debugger.interrupt_last }