Ruby on Windows: debugger questions and comments

'm evaluating scripting languages for a client. Ruby as a language
seems immediately likeable (I love the Smalltalk influence) but the
tools and their documentation seem likely to cause big problems for
Windows users. (Thelanguage docs otoh are exemplary.) In particular:

1. It seems that the debugger built into FreeRIDE doesn't work under
Windows? If this is true, why on earth doesn't the debugger pop a
dialog box saying this when you try to use it??? Leaving around a
broken debugger without any warning to users in a development
environment makes Ruby look so bad compared to the standard Python and
Perl distributions. A few minutes effort would at least stop Ruby from
looking unreliable.

2. Could someone tell me where I could find documentation on the debug
mode for the interpreter? Its use might be self-evident to people who
have to use GDB type tools every day, but for those of who don't still
use use the Pony Express a page or two of docs would help.

3. Can anyone recommend another Ruby debugger? I've briefly tried
Arachno (bizarrely it doesn't seem to show the value of variables) -
is there anything else?

Thanks.

JC wrote:

1. It seems that the debugger built into FreeRIDE doesn't work under
Windows? If this is true, why on earth doesn't the debugger pop a
dialog box saying this when you try to use it??? Leaving around a
broken debugger without any warning to users in a development
environment makes Ruby look so bad compared to the standard Python and
Perl distributions. A few minutes effort would at least stop Ruby from
looking unreliable.

The latest version of FreeRide, and the version of FreeRIDE that comes with
the One-Click Ruby Installer for Windows, both have working debuggers.

Curt

Off topic but here goes:

I know this sounds like a long stretch but after writing thousands of
lines of production code in ruby my observation is that the lack of
debugger is actually beneficial for the project because it results in
better test coverage.
When i encounter a bug or observe an oddity I go ahead and write a
small test case for it which doesn't take much longer than using the
debugger. After I'm done I'm left with the certainty that it works
just like after using a debugger, however I also know it will never
break again because now i got a test case double checking it for me.

3. Can anyone recommend another Ruby debugger? I've briefly tried
Arachno (bizarrely it doesn't seem to show the value of variables) -
is there anything else?

Rails ships with a breakpointer. This opens an IRB session on the spot
when you put the method call "breakpoint" anywhere in your code.

···

--
Tobi
http://www.snowdevil.ca - Snowboards that don't suck
http://www.hieraki.org - Open source book authoring
http://blog.leetsoft.com - Technical weblog

JC wrote:
<snip>

3. Can anyone recommend another Ruby debugger? I've briefly tried
Arachno (bizarrely it doesn't seem to show the value of variables) -
is there anything else?

Thanks.

There is also the debugger that comes with RDT (the Ruby plugin for
Eclipse). Visit http://rubyeclipse.sf.net

Regards,

Dan

umptious@gmail.com (JC) writes:

3. Can anyone recommend another Ruby debugger? I've briefly tried
Arachno (bizarrely it doesn't seem to show the value of variables) -
is there anything else?

  Arachno ruby show variable values just fine, at least for me. I'm using
  Arachno 0.4. Have you enabled break point and is the debuggee state pane
  visible for you?

- Ville

Not a debugger, but various coverage, profiling, thread analysis and
flow tracing tools (which do show the variable values). Windows
NT/W2K/XP.

        http://www.softwareverify.com

Stephen

···

In message <c52828d1.0502131410.388af18f@posting.google.com>, JC <umptious@gmail.com> writes

3. Can anyone recommend another Ruby debugger? I've briefly tried
Arachno (bizarrely it doesn't seem to show the value of variables) -
is there anything else?

--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk
RSI Information: http://www.objmedia.demon.co.uk/rsi.html

2. Could someone tell me where I could find documentation on the

debug

mode for the interpreter? Its use might be self-evident to people who
have to use GDB type tools every day, but for those of who don't

still

use use the Pony Express a page or two of docs would help.

http://www.rubycentral.com/book/trouble.html

In particular, the command list table at the bottom of the page. Just
re-discovered this chapter in the book on the train ride to work this
morning, trying to figure out a problem I'm having.

"Curt Hibbs" <curt@hibbs.com> wrote in message news:<EAENKKNOJPMNCDMLDOMLOEEOHNAA.curt@hibbs.com>...

JC wrote:
>
> 1. It seems that the debugger built into FreeRIDE doesn't work under
> Windows? If this is true, why on earth doesn't the debugger pop a
> dialog box saying this when you try to use it??? Leaving around a
> broken debugger without any warning to users in a development
> environment makes Ruby look so bad compared to the standard Python and
> Perl distributions. A few minutes effort would at least stop Ruby from
> looking unreliable.

The latest version of FreeRide, and the version of FreeRIDE that comes with
the One-Click Ruby Installer for Windows, both have working debuggers.

Curt

So why does the FreeRIDE homepage say: "Unfortunately, the debugger
still does not work on Windows. We are actively trying to resolve this
problem."? And why does the Ruby 182-14 install that I downloaded NOT
having aworking debugger?

Ville Mattila <mulperi@cc.hut.fi> wrote in message news:<mzu7n10y.fsf@cc.hut.fi>...

umptious@gmail.com (JC) writes:

> 3. Can anyone recommend another Ruby debugger? I've briefly tried
> Arachno (bizarrely it doesn't seem to show the value of variables) -
> is there anything else?

  Arachno ruby show variable values just fine, at least for me. I'm using
  Arachno 0.4. Have you enabled break point and is the debuggee state pane
  visible for you?

- Ville

As far as I can tell given the lack of docs, yes. I can set
breakpoints and I can even see what variables are in scope, but I'm
not getting values.

"Daniel Berger" <djberg96@hotmail.com> wrote in message news:<1108348231.245081.165380@g14g2000cwa.googlegroups.com>...

JC wrote:
<snip>
> 3. Can anyone recommend another Ruby debugger? I've briefly tried
> Arachno (bizarrely it doesn't seem to show the value of variables) -
> is there anything else?
>
> Thanks.

There is also the debugger that comes with RDT (the Ruby plugin for
Eclipse). Visit http://rubyeclipse.sf.net

Regards,

Dan

Thanks - I'll check.

Tobias Luetke wrote:

3. Can anyone recommend another Ruby debugger?

Rails ships with a breakpointer. This opens an IRB session on the spot
when you put the method call "breakpoint" anywhere in your code.

And it works outside of Rails as well -- just copy the breakpoint*.rb and binding_of_caller.rb files over to somewhere where your application finds them, do require 'breakpoint' and place breakpoint() calls in your code to get an IRB session right there at that spot. Ruby's powerful introspection abilities will then easily let you examine variables, instance_variables, methods, call stack and much more.

By default those sessions will be inline, meaning they will happen via the application's regular STDIN/OUT which is usually okay for Ruby tools, but not for CGI applications, daemons etc. -- for those cases you should do a single Breakpoint.activate_drb call (you can do this right after the require) and the breakpoints will wait in server mode until you connect with breakpoint_client.rb. (ruby breakpoint_client.rb)

If there's any questions regarding this I'd be pleased to answer them.

jason_watkins@pobox.com wrote in message

http://www.rubycentral.com/book/trouble.html

In particular, the command list table at the bottom of the page. Just
re-discovered this chapter in the book on the train ride to work this
morning, trying to figure out a problem I'm having.

Thank you, Jason - that's really useful.

has there been a later version of freeride released. i've been using
(sort of) v0.9.2.

threads still don't show up in the 'threads's tab while debugging...

http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

···

On Mon, 14 Feb 2005 07:47:47 +0900, you wrote:

The latest version of FreeRide, and the version of FreeRIDE that comes with
the One-Click Ruby Installer for Windows, both have working debuggers.

this is something that step by step instructions (with a list of
gotcha's along the way) would be handy...

a few weeks ago the screenshots of RDT were enough to coax me into
trying eclipse...but i couldn't get RDT installed. i ended up
uninstalling eclipse.

http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

···

On Mon, 14 Feb 2005 11:34:57 +0900, you wrote:

There is also the debugger that comes with RDT (the Ruby plugin for
Eclipse). Visit http://rubyeclipse.sf.net

> JC wrote:

So why does the FreeRIDE homepage say: "Unfortunately, the debugger
still does not work on Windows. We are actively trying to resolve this
problem."? And why does the Ruby 182-14 install that I downloaded NOT
having aworking debugger?

Further comments: if I run rubygems, then the debugger semi-works - ie
I can step through code but see the state of variables (which seems
pretty pointless).

Comments:

- Five minutes of documentation would have made using the debugger
such as it is much smooother. Yes, there had been some sort of
"require rubgems" message, but that's not the same as saying "there's
a separate program caled rubygemsetcetc.exe that you if have to run to
make the debugger work" - this looked like a library error at first,
then when I checked the FreeRIDE site simply like a completely broken
debugger.

- A debugger that won't show variable values (if this is the case)
should be documented in the faq and Ride help.

I know these tools are written for volunteers for free, but if want
Ruby to spread the last thing you want is tools that cause FUD. Right
now that's what you have - when even basic tools are this poorly
documented its bound to settle new users. A few minutes documentation
effort would avoid this. You don't have to get the debugger to work,
but you really should document how to switch it on (!) and what its
limitations are. This is literally ten minutes effort.

tony summerfelt wrote:

The latest version of FreeRide, and the version of FreeRIDE that
comes with
the One-Click Ruby Installer for Windows, both have working debuggers.

has there been a later version of freeride released. i’ve been using
(sort of) v0.9.2.

threads still don’t show up in the 'threads’s tab while debugging…

that’s the most recent version. I’m forwarding this to the FreeRIDE ML to
make sure Laurent is aware of this.

Curt

···

On Mon, 14 Feb 2005 07:47:47 +0900, you wrote:

Tony,
  What problems did you run into in installing RDT?

1. You install the Eclipse Runtime Binary
2. Choose Help->Software Updates->Find and Install
3. In the dialog choose "Search for new features to install" and push
next
4. Select "Add Update Site", enter an arbitrary name and the url
http://rubyeclipse.sf.net/updatesite
5. Check RDT and push next
6. Select the feature org.rubypeople.rdt and push next. RDT will be
installed and be available after restart.

Does this help? I'd like to do anything we can to help users of our
plugin.

Thanks,
Chris

···

-----Original Message-----
From: tony summerfelt [mailto:snowzone5@hotmail.com]
Sent: Tuesday, February 15, 2005 7:19 PM
To: ruby-talk ML
Subject: Re: Ruby on Windows: debugger questions and comments

On Mon, 14 Feb 2005 11:34:57 +0900, you wrote:

>There is also the debugger that comes with RDT (the Ruby plugin for
>Eclipse). Visit http://rubyeclipse.sf.net

this is something that step by step instructions (with a list of
gotcha's along the way) would be handy...

a few weeks ago the screenshots of RDT were enough to coax me into
trying eclipse...but i couldn't get RDT installed. i ended up
uninstalling eclipse.

http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 2/14/2005

other than that the debugging works well...

the only other problem i have with freeride is that i can't see the
cursor :slight_smile:

i prefer dark/black backgrounds, so i adjust all the editor items to
reflect that...unfortunately the cursor becomes almost impossible to
see on my lcd with the brightness turned down (which i have to do
because the monitor is so bright to start with). even taking away the
blinking doesn't really help...

freeride is now my ruby ide of choice...
http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

···

On Wed, 16 Feb 2005 09:27:52 +0900, you wrote:

that's the most recent version. I'm forwarding this to the FreeRIDE ML to
make sure Laurent is aware of this.

umptious@gmail.com (JC) wrote in message news:<c52828d1.0502140253.54a975f4@posting.google.com>...

Ville Mattila <mulperi@cc.hut.fi> wrote in message news:<mzu7n10y.fsf@cc.hut.fi>...
> umptious@gmail.com (JC) writes:
>
> > 3. Can anyone recommend another Ruby debugger? I've briefly tried
> > Arachno (bizarrely it doesn't seem to show the value of variables) -
> > is there anything else?
>
> Arachno ruby show variable values just fine, at least for me. I'm using
> Arachno 0.4. Have you enabled break point and is the debuggee state pane
> visible for you?
>
> - Ville

As far as I can tell given the lack of docs, yes. I can set
breakpoints and I can even see what variables are in scope, but I'm
not getting values.

Strange, can you email me screenshot. About this, this is the first
bug report about the variable display i got.

JC schrieb:

- Five minutes of documentation would have made using the debugger
such as it is much smooother.

I'm sure you did what you suggested and sent the missing documentation to the FreeRide maintainers, did you?

Regards,
Pit