Hurrahhh! breakpoints reactivated
Posted on March 19, 2007 - Filed Under Links, Ruby, RubyOnRails
Rails framework offers breakpoints in application. Unfortunately, to all developers from some time they don’t work, since they relay on ruby-breakpoint library, which is not maintained anymore. However there is available replace: ruby-debug.
So go to Data Noise for usage instructions. Works for me (however I had some quirks, which have suddenly disappeared, I won’t cry for them :) ). In comments to post linked above are detailed, step-by-step instruction how to setup new debugger environment. Here is quote from this comment:
For reference, here’s how I got it working:
1) Add this 2 lines to development:
require 'ruby-debug' Debugger.start2) stop and start with ./script/server webrick
3) put “debugger” on the line where you want the code execution to stop.
4) Run the code from the browser and go back to terminal. You should see something like (rdb:2) on the last line
5) type “irb”. You should now have everything at your fingertips! (You could also type “help” to see all available commands).
It works only with webrick as server, but in development environment it is no issue, at least for me.
Popularity: 4% [?]
Hits for this post: 1507
Similar Posts
- Adding Rails application to /usr/local/etc/rc.d/
- How to start debug Ruby programs?
- Failing plugins discover
- Why are You doomed being Ruby developer on Windows platform
- Continuing with Rails version locking
Comments
Leave a Reply



