# File lib/mongrel.rb, line 972
972:     def debug(location, what = [:object, :rails, :files, :threads, :params])
973:       require 'mongrel/debug'
974:       handlers = {
975:         :object => "/handlers/requestlog::access", 
976:         :rails => "/handlers/requestlog::files", 
977:         :files => "/handlers/requestlog::objects", 
978:         :threads => "/handlers/requestlog::threads",
979:         :params => "/handlers/requestlog::params"
980:       }
981: 
982:       # turn on the debugging infrastructure, and ObjectTracker is a pig
983:       ObjectTracker.configure if what.include? :object
984:       MongrelDbg.configure
985: 
986:       # now we roll through each requested debug type, turn it on and load that plugin
987:       what.each do |type| 
988:         MongrelDbg.begin_trace type 
989:         uri location, :handler => plugin(handlers[type])
990:       end
991:     end