I am a windows rails developer, and I love rad-rails. However, it has a big gap when it comes to debugging features. But, when using the ruby-debug gem in tandem with the external tools feature of rad-rails (eclipse), debugging can become surprisingly pleasant. In this article I will show you how to set up various “External Tools” shortcuts to aid you debug rails applications (and do other things).
The internal console window has issues. Namely, when you input a character, the console sends the character twice, which is very intrusive when using the debug command line.
Click the “new launch configuration” icon in the dialog that appears. Fill in the fields as follows:
Then, click the environments tag. Add your rails environment variable, click OK.
Finally, disable allocation of a console for input.
Click close and you’re done!
Now, any time you want to want to start an external rails console, open a project, click your external tool, and
Then, change the first page to the following (you can keep the rest of the tabs the same, since they will have been copied from the previous configuration)
(this is very handy for debugging)
Then, create the file c:\ruby\bin\run_pause.bat:
cmd /C %*
Running a test case this way is very handy for debugging test cases! (it saves you a lot of time not having to run all of the other test cases).
Your path for rake_test_loader.rb may very. If it does, make sure update the path from what I gave you
The possibilities are basically limitless! Happy external-launching!