Debugger Not Working

I am using Rails 2.0.2 on XP with Aptana Studio (free version). I have tried using the debugger breakpoints but it does n0t work (skips the breakpoint). Aptana's debugger is not working also.

I usually use webrick or mongrel but I dont know if that has anything to do with the debugger. Due to this I am reduced to using logger.debug commands to output state. Any help in this regard would immensely help the debugging.

Thanks.

Ather Shiraz wrote:

I am using Rails 2.0.2 on XP with Aptana Studio (free version). I have tried using the debugger breakpoints but it does n0t work (skips the breakpoint). Aptana's debugger is not working also.

I usually use webrick or mongrel but I dont know if that has anything to do with the debugger. Due to this I am reduced to using logger.debug commands to output state. Any help in this regard would immensely help the debugging.

The entire concept of debugging in RoR is counterproductive. RoR has one of the industry's best unit test systems - an incredible accomplishment (typical of Ruby) - given WWW technology is one of the hardest things to test.

Write unit tests for all your features, and bugs will go away before you need to debug them. Prevention is better than a cure.

I am using Rails 2.0.2 on XP with Aptana Studio (free version). I have tried using the debugger breakpoints but it does n0t work (skips the breakpoint). Aptana's debugger is not working also.

I usually use webrick or mongrel but I dont know if that has
anything to do with the debugger. Due to this I am reduced to using logger.debug commands to output state. Any help in this regard would immensely help the debugging.

Is your server started with the --debugger flag ?

Fred

You seem to be saying that well unit tested software doesn't have bugs, which seems optimistic at best. What about the problems you didn't anticipate? And once you do get a bug, I suppose you could run unit tests endlessly working out what the problem is one assertion at the time, but getting in there with the debugger is a hell of a lot quicker in my experience (particularly if the whole problem is that you don't understand why unexpected behaviour X is happening)

Fred

Frederick Cheung wrote:

Is your server started with the --debugger flag ?

Fred

Yes I tried with -debugger also like this : ruby script/server --debugger

and it breezes past the "debugger" line as if it didnt exist. I am using this as a guidance :

Then since Aptana failed to provide a working debugger I tried downloading the NetBeans IDE but its debugger does not work either. I am emailing the Netbeans people but apparently it attempt to do a gem update EVERYTIME I try to debug and it successfully updates (or gives that message) then it gives an error message that "fast debugger failed to install"! Now I tried to continue without fast debugger but it says that this application needs fast debugger! What is up with that?

Your help is therefore much appreciated in resolving this issue please.

Thanks!

Frederick Cheung wrote:

Is your server started with the --debugger flag ?

Fred

Yes I tried with -debugger also like this : ruby script/server --debugger

and it breezes past the "debugger" line as if it didnt exist. I am
using this as a guidance : http://www.sitepoint.com/print/debug-rails-app-ruby-debug

Then since Aptana failed to provide a working debugger I tried downloading the NetBeans IDE but its debugger does not work either.
I am emailing the Netbeans people but apparently it attempt to do a gem update EVERYTIME I try to debug and it successfully updates (or gives that message) then it gives an error message that "fast debugger
failed to install"! Now I tried to continue without fast debugger but it says that this application needs fast debugger! What is up with that?

So do you or do you not have the ruby-debug gem installed? If you
don't then you've got to get it installed.

Fred

Frederick Cheung wrote:

--debugger update EVERYTIME I try to debug and it successfully updates (or gives that message) then it gives an error message that "fast debugger
failed to install"! Now I tried to continue without fast debugger but it says that this application needs fast debugger! What is up with that?

So do you or do you not have the ruby-debug gem installed? If you don't then you've got to get it installed.

Fred

I believe I do because it says that the gem is installed (successfully after installation); when i re run it on the console it says no further updates; when however i run it through netbeans it attempts to install again and says it installed successfully but then gives an error window saying that the debugger failed to install. When I do gem -list it says ruby-debug-base 0.10.1, 0.10.0 as well as ruby-debug.ide (0.1.10) as listed.

Frederick Cheung wrote:

--debugger update EVERYTIME I try to debug and it successfully updates (or
gives that message) then it gives an error message that "fast debugger failed to install"! Now I tried to continue without fast debugger but it
says that this application needs fast debugger! What is up with that?

So do you or do you not have the ruby-debug gem installed? If you don't then you've got to get it installed.

Fred

I believe I do because it says that the gem is installed (successfully after installation); when i re run it on the console it says no
further updates; when however i run it through netbeans it attempts to install again and says it installed successfully but then gives an error
window saying that the debugger failed to install. When I do gem -list it
says ruby-debug-base 0.10.1, 0.10.0 as well as ruby-debug.ide (0.1.10) as

If at an irb prompt you run require 'rubygems' require 'ruby-debug' debugger

do you break into the debugger?

Fred

Frederick Cheung wrote:

Frederick Cheung wrote:

says

further updates; when however i run it through netbeans it attempts to
install again and says it installed successfully but then gives an error window saying that the debugger failed to install. When I do gem -list it says ruby-debug-base 0.10.1, 0.10.0 as well as ruby-debug.ide (0.1.10) as

If at an irb prompt you run require 'rubygems' require 'ruby-debug' debugger

do you break into the debugger?

Fred

I have put require "ruby-debug" statement in development.rb but it doesnt work (I did restart).

I typed IRB in the application's directory and the irb prompt started. It gave false to rubygems, true to ruby-debug and 1 to debugger (as an answer).

You should have got a debugger prompt, so something's bust.

Fred

Frederick Cheung wrote: