diff --git a/bin/rdebug-ide b/bin/rdebug-ide index 4ebb1b2..9ce12f2 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 + $1 : '') + script # install interruption handler trap('INT') { Debugger.interrupt_last } 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