scattrbrain
Darshan Patil's personal blog
Debugging Rails
script/breakpointer does not work anymore with the latest stable version of rails. The new way to debug rails applications is to use ruby-debug. To use this to debug your rails applications, do the following
gem install ruby-debug
Once, that is done, edit config/environments/development.rb in your rails application and add the following line to the end of the file.
require 'ruby-debug'
To break into the debugger, you need to call
debugger()
where you would have previously called breakpoint(). When debugger() is executed, the server will break into the debugger. Run help to see a list of available commands. You can also launch an irb process by typing irb at the debugger prompt.
Note: Debugger does not work with fastcgi. It works with mongrel and webrick.














