public
Fork of ddollar/rack-debug
Description: Rack::Debug is middleware that provides a simple interface to ruby-debug. Helps debug apps running in Passenger.
Homepage: http://ddollar.github.com/rack-debug
Clone URL: git://github.com/saimonmoore/rack-debug.git
name age message
file README.rdoc Loading commit data...
directory ext/ Mon May 11 18:57:36 -0700 2009 initial commit [David Dollar]
file init.rb Mon May 11 18:57:36 -0700 2009 initial commit [David Dollar]
directory lib/
directory tasks/ Wed May 13 16:48:25 -0700 2009 add a description to the rake task [David Dollar]
README.rdoc

Installation:

 script/plugin install git://github.com/ddollar/rack-debug.git

Usage:

 # config/environments/development.rb
 config.middleware.use "Rack::Debug"

 # add debugger statements to your code
 @user = User.find(params[:id])
 debugger
 render :show

Debugging:

 # run the rake task,
 $ rake debug
 Connected.

 # refresh a page in your browser, your app will break at debugger statements
 (rdb:1) p @user
 #<User id: 1, name: "David Dollar", email: "ddollar@gmail.com", created_at: "...", updated_at: "...">

Thanks to:

  Rack::Bug for a good example of Rack middleware in Rails
  Ben Scofield for making me want to build some Rack middleware