Saturday, June 06, 2009

Matt Ward is the maintainer of the IronPython support in SharpDevelop, a .NET IDE for Windows. His latest entry takes us through the IronPython debugger built into SharpDevelop. This was built using the techniques explored by Harry Pierson in writing his IronPython debugger. Crucial to debugging IronPython is "Just My Code" support (so you don't have to wade through the Dynamic Language Runtime internals when you want to step through Python code) - and this is the name of the feature in SharpDevelop.

Ensure that the Just My Code feature is checked and that the Step over code without symbols is not checked. If the Step over code without symbols option is selected then stepping will not work properly and lines of code will be skipped over.

There are two ways to debug your code. You can use the Python menu or modify the project options. We will look at both of these alternatives. First open your IronPython project into SharpDevelop. Open your main file and make sure it is the active text editor window. Set a breakpoint somewhere in your code. Then from the Python menu select Run...

Darell Hawley is a Microsoft C# MVP with an interest in IronPython. With the new IronPython support in SharpDevelop 3.1 he's been giving it a spin and blogged his initial impressions:

SharpDevelop is an open source IDE for the .NET platform. Is it new? Hardly. Based on the history of news releases from their website, It’s been around since December of 2000. Considering that the .NET platform was publicly announced only 6 months earlier, SharpDevelop seems only that much more mature.

If you’re comfortable with the basics of Visual Studio, SharpDevelop should feel like home to you. In fact, the best way to describe SharpDevelop is “Visual Studio without a lot of stuff I don’t want and a few third-party items I do”.

SharpDevelop uses NUnit instead of MSTest. That’s right. No third party plugins to make your IDE work with NUnit. It simply works.

It’s time for me to confess. It’s all about IronPython. The reason I started investigating SharpDevelop is because of my frustration with Visual Studio’s lack of support for the language. Specifically, I want Intellisense when I write IronPython. To be sure, you only get Intellisense for “non-DLR code”, but surprisingly that doesn’t seem to be as much of a handicap as you might think.

If you’re frightened of the consequences that may come from changing your development environment, don’t be. You can open one of your existing Visual Studio solutions with SharpDevelop and start coding. Switching back is as simple as opening up your now modified project/solution in Visual Studio.