can't debug rails script

This seems like it should be really obvious, but I'm clearly missing something.  I have a model in a rails app, and I want to quickly run through a method using breakpoints etc.  If I simply debug the ruby script that is my model, the environement doesn't load so I get an error.  If I switch to the development config the server loads and then nothing happens and I can't figure out how to just step through my model?  This seems like it'd be the simplest thing but I can't figure it out.

1 comment
Comment actions Permalink

If I simply debug the ruby script that is my model, the environement doesn't load so I get an error.

Yes, it is ok, because Rails server loads models in rails application runtime environment

If I switch to the development config the server loads and then nothing happens and I can't figure out how to just step through my model?  This seems like it'd be the simplest thing but I can't figure it out.

Have you launched server in "Debug" mode? If yes, then just put breakpoint in Model and then force server to run piece of code were you put your breakpoint. E.g. you can enter a url in browser which force some of your controller actions to invoke your code in model.

0

Please sign in to leave a comment.