I am new to Ruby so have installed RadRails, Ruby 1.92 and ruby-debug-ide19. I have a very simple ruby program that prints hello world. But when I try and place a breakpoint in the code and run in debug mode all i get is the following line on the console:
Fast Debugger (ruby-debug-ide 0.4.9) listens on :51224
Why does it need to listen on a port anyway? And how can i get it to run my program until the breakpoint?
Personally, I don't bother with an IDE for debugging. I prefer to be closer to the metal... err... command-line, so I use ruby-debug19 from the command-line.
For the basics use:
b
to set your breakpointsn
to step over methodss
to step into methodsc
to continue running after hitting a breakpointc n
to run to a particular line then stopp
to display a valueh
will display the built-in helpirb
drops into IRB with the current variables pre-initialized so you can poke at things with a stick and see what they'll do.More docs are at the Ruby-Debug site.