lib/ruby-debug.rb in ruby-debug-ide-0.3.4 vs lib/ruby-debug.rb in ruby-debug-ide-0.4.0
- old
+ new
@@ -10,11 +10,11 @@
module Debugger
class << self
# Prints to the stderr using printf(*args) if debug logging flag (-d) is on.
def print_debug(*args)
- if Debugger.is_debug
+ if Debugger.cli_debug
$stderr.printf(*args)
$stderr.printf("\n")
$stderr.flush
end
end
@@ -51,11 +51,12 @@
event_processor.at_return(self, file, line)
end
end
class << self
- attr_accessor :event_processor, :is_debug
+
+ attr_accessor :event_processor, :cli_debug, :xml_debug
attr_reader :control_thread
#
# Interrupts the current thread
#
@@ -91,15 +92,11 @@
# wait for 'start' command
@mutex.synchronize do
@proceed.wait(@mutex)
end
- bt = debug_load(Debugger::PROG_SCRIPT, false, load_mode)
- if bt
- $stderr.print bt.backtrace.map{|l| "\t#{l}"}.join("\n"), "\n"
- $stderr.print "Uncaught exception: #{bt}\n"
- end
+ debug_load(Debugger::PROG_SCRIPT, false, load_mode)
end
def run_prog_script
@mutex.synchronize do
@proceed.signal
@@ -112,11 +109,10 @@
@control_thread = DebugThread.new do
begin
unless RUBY_PLATFORM =~ /darwin/i # Mac OS X seems to have problem with 'localhost'
host ||= 'localhost' # nil does not seem to work for IPv6, localhost does
end
- Debugger.print_debug("Waiting for connection on '#{host}:#{port}'")
- $stderr.printf "Fast Debugger (ruby-debug-ide 0.3.4) listens on #{host}:#{port}\n"
+ $stderr.printf "Fast Debugger (ruby-debug-ide 0.4.0) listens on #{host}:#{port}\n"
server = TCPServer.new(host, port)
while (session = server.accept)
begin
interface = RemoteInterface.new(session)
@event_processor = EventProcessor.new(interface)