Rails Debugging
July 03, 2008
Easy peasy once you know how.
- start up your server with the
-u
- put
debugger
in your code where you want the debugger to start - run that code e.g. in a web browser
The web browser will hang, and a debugging session will be started in the terminal you ran the server. Main things to remember are
h
get helpl
list the code where you arereload
if debugger doesn’t pick up changes in your code give it a little kickcont
carry on execution
That should be enough to keep me happy