# File lib/mongrel.rb, line 972 def debug(location, what = [:object, :rails, :files, :threads, :params]) require 'mongrel/debug' handlers = { :object => "/handlers/requestlog::access", :rails => "/handlers/requestlog::files", :files => "/handlers/requestlog::objects", :threads => "/handlers/requestlog::threads", :params => "/handlers/requestlog::params" } # turn on the debugging infrastructure, and ObjectTracker is a pig ObjectTracker.configure if what.include? :object MongrelDbg.configure # now we roll through each requested debug type, turn it on and load that plugin what.each do |type| MongrelDbg.begin_trace type uri location, :handler => plugin(handlers[type]) end end