On IDEs and Consoles

Posted by Charlie Fri, 23 Jun 2006 06:01:00 GMT

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.

Posted in  | 4 comments | 1 trackback

Comments

  1. Avatar murphee said about 4 hours later:

    There’s EclipseShell http://eclipse-shell.sourceforge.net/ 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. Avatar Charlie said about 13 hours later:

    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. Avatar vikwiz said 4 days later:

    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. Avatar Charlie said 7 days later:

    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.

Trackbacks

Use the following link to trackback from your own site:
http://cfis.savagexi.com/trackbacks?article_id=on-ides-and-consoles&day=23&month=06&year=2006

  1. From cfis
    Arachno
    Last time I gave kudos to Sapphire in Steel for the addition of a Ruby console to their debugger. This time its kudos for Arachno. Lother Scholz, the develeper, sent me an email the next day saying that the latest build now includes a Ruby console...

Comments are disabled