lib/ruby-debug.rb in debugger-1.4.0 vs lib/ruby-debug.rb in debugger-1.5.0
- old
+ new
@@ -2,10 +2,11 @@
require 'stringio'
require 'socket'
require 'thread'
require 'ruby-debug-base'
require 'ruby-debug/processor'
+Dir.glob(File.expand_path("../ruby-debug/printers/**/*.rb", __FILE__)).each { |f| require f }
module Debugger
self.handler = CommandProcessor.new
# the port number used for remote debugging
@@ -33,17 +34,18 @@
# If set, a string to look for in caller() and is used to see
# if the call stack is truncated.
attr_accessor :start_sentinal
+ attr_accessor :printer
+
attr_reader :thread, :control_thread, :cmd_port, :ctrl_port
def interface=(value) # :nodoc:
handler.interface = value
end
- #
# Starts a remote debugger.
#
def start_remote(host = nil, port = PORT)
return if @thread
@@ -148,9 +150,10 @@
interface = ScriptInterface.new(File.expand_path(file), out)
processor = ControlCommandProcessor.new(interface)
processor.process_commands(verbose)
end
end
+ self.printer ||= Printers::Plain.new
end
module Kernel
# Enters the debugger in the current thread after _steps_ line events occur.