Rails Debugging

July 03, 2008

Easy peasy once you know how.

  1. start up your server with the -u
  2. put debugger in your code where you want the debugger to start
  3. 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 help
  • l list the code where you are
  • reload if debugger doesn’t pick up changes in your code give it a little kick
  • cont carry on execution

That should be enough to keep me happy