In VBA you can step through the code and at any point examine all the
state. Is there any similar facility for Ruby?
···
--
Posted via http://www.ruby-forum.com/.
In VBA you can step through the code and at any point examine all the
state. Is there any similar facility for Ruby?
--
Posted via http://www.ruby-forum.com/.
There is a debugger for ruby which you use through the shell. There's a
pretty good run through of it over at railscasts.com:
Take a look.
Ben
On Sun, Jun 14, 2009 at 3:17 PM, Mike Stephens <rubfor@recitel.net> wrote:
In VBA you can step through the code and at any point examine all the
state. Is there any similar facility for Ruby?
--
Posted via http://www.ruby-forum.com/\.
In addition to ruby-debug, Netbeans, RubyMine and Eclipse (via Aptana)
all provide this capability.
John
On Sun, Jun 14, 2009 at 10:17 AM, Mike Stephens<rubfor@recitel.net> wrote:
In VBA you can step through the code and at any point examine all the
state. Is there any similar facility for Ruby?
Ben Lovell wrote:
On Sun, Jun 14, 2009 at 3:17 PM, Mike Stephens <rubfor@recitel.net> wrote:
In VBA you can step through the code and at any point examine all the
state. Is there any similar facility for Ruby?
--
Posted via http://www.ruby-forum.com/\.There is a debugger for ruby which you use through the shell. There's a
pretty good run through of it over at railscasts.com:#54 Debugging with ruby-debug - RailsCasts
Take a look.
Ben
and...unfortunately, the gem version of it - ruby-debug, which is much more usable than the built in version, doesn't work with 1.9. Sigh.
t.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc@tomcloyd.com >> (email)
<< TomCloyd.com >> (website) << sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Perhaps I should install one of those and try them out?
But seriously, I have not really longed for this feature recently.
I sometimes use gdb for C code because it's harder to add debugging
output there with all the recompilation and stuff. However, I have
observed that machine instructions are apparently small enough that
the principle of uncertainty known from the quantum theory applies. By
observing your code with a debugger you may cause it to behave
differently than how it behaves otherwise. These cases are quite rare
but the more insidious are the resulting problems.
In theory you write tests for your code and if fitting multiple pieces
together fails you write more tests that cover more cases, perhaps
ones that were uninteresting previously but became some sort of
turning points when multiple pieces of code interact.
As you might not see because I haven't published my code I have not
written the tests so I ended up writing ad-hoc tests for cases that
fail and debug those which is somewhat harder after the fact. Having
the tests ready would certainly make it easier to understand how
things fail, probably even more so than having a debugger.
Thanks
Michal
2009/6/18 John Wells <lists@sourceillustrated.com>:
On Sun, Jun 14, 2009 at 10:17 AM, Mike Stephens<rubfor@recitel.net> wrote:
In VBA you can step through the code and at any point examine all the
state. Is there any similar facility for Ruby?In addition to ruby-debug, Netbeans, RubyMine and Eclipse (via Aptana)
all provide this capability.
Step into/out/over, callstack navigation, tracepoints, breakpoints,
break on hitcount, conditional breakpoints, watch variables, locals,
autos, drilldown into objects, hover-and-drilldown (etc.)
http://www.sapphiresteel.com/Debugging-Ruby-with-the-Cylon
best wishes
Huw
--
Posted via http://www.ruby-forum.com/.