On IDEs and Consoles

In the religious war between the command line and IDE (integrated
development environment), I’m firmly on the IDE side. Having said that,
there’s no substitute for having a console when working with a dynamic
language like Ruby, or Python or JavaScript, etc.

What I really want is the two combined. I should be able
to set a breakpoint in my IDE and when the breakpoint triggers have access
to the standard IDE inspectors (watch window, local variables, etc.).
But I also want access to a console, so I can do more sophisticated
debugging when needed.

This is pretty obvious stuff – Visual Studio has had a Immediate Windows
for ages where you can poke around the internals or your C++, C#, JScript
or VB program. Borland’s IDE’s had similar functionality, although not
as easy to use.

Yet its strangely lacking in the Ruby community. I’ve tried all the IDEs
– FreeRide, Arachno (my favorite), Komodo, RDT, eric3, etc. None of them
can do it. And really, its not just an IDE thing, my understanding
is that the VIM Ruby integration doesn’t have this either.

So kudos to Sapphire in Steel,
a new plug-in that turns Visual Studio 2005 into a Ruby IDE. The integrated
debugger comes complete with a Ruby console window. When you hit a breakpoint,
the console is bound to the current context. So if your code set a local
variable “foo” to the value 7, just type in “foo” in the console and you’ll
get back 7. You can do pretty much anything you want, including modifying
the local variable.

Nice work – I have high hopes for the future of Sapphire
in Steel

  1. murphee
    June 23, 2006

    There’s EclipseShell
    which gives you an interactive editor that acts as a shell inside Eclipse. It supports JRuby and can also remote control irb. Currently, it’s not hooked into the RDT debugger or launch system (so code executed with EclipseShell can’t trigger breakpoints in RDT) yet, but that’s not difficult to do (actually, I hadn’t thought of that yet, but I’ll have to try to add that).
    Disclaimer: I’m the maintainer of EclipseShell;

  2. Charlie
    June 23, 2006

    Hi Murphee – thanks for the tip. Sounds like a great idea, that would be a nice addition for RDT. I’ll check it out.

  3. vikwiz
    June 27, 2006

    Hi Charlie,
    surprise that you didn’t even mention RadRails? Although mostly I’m on the console/emacs side, I use RadRails for a Rails project now. It’s an Eclipse plugin, but you download it as a complete package. It’s incomplete yet pretty good working version now. Check it, if you didn’t do it yet!

  4. Charlie Savage –
    July 1, 2006

    Hi vikwiz – good point, I should have mentioned RadRails. I group it in with RDT since its based on RDT, but that might not be fair.

    I have to say I like Visual Studio better than Eclipse – it snappier and looks better. But Eclipse has come a long way in the last couple of years. Its also multi-platform and has a nice plugin for C++. But like all Java GUI apps its slow and eats memory like no tomorrow. I figure one more generation of hardware upgrade will have that problem licked.


Leave a Reply

Your email address will not be published.