Reputation: 471
I'm getting started with SharpDevelop and IronPython, and I have been having issues with basic debugging.
First, how do I deal with unhandled errors?
While using Debug->Run, if there's an error in my application, a message will briefly flash on the ipy console, but the the app will immediately close along with the ipy console. This must be a simple fix but I've been having difficulty finding it.
If I use Debug->"Run without debugger", I do get an post-compile unhandled exception error message, but it's in a format that would be difficult to parse for a decently-sized app.
Second, the "watch" window seems almost useless. It doesn't seem to recognize python form control objects (i.e. "self._textBox1), and throws unhandled exceptions often.
Third, there seems to be a LOT less context help than I've come to expect from a python IDE, especially on those same form controls. And in a similar way, putting the mouse arrow over a variable while on a breakpoint rarely shows me anything.
So perhaps my environment is misconfigured! If someone has all or most of this working, I would love to hear (or be pointed to) how this can be fixed. The GUI form designer is way cool, but it's not worth constant debugging hassles.
EDIT: The answer I've chosen shows, I think, that I really cannot recommend using SharpDevelop with IronPython right now.
Upvotes: 2
Views: 1146
Reputation: 1562
this is a bit longer then a comment, so I'm just putting it as an anwer for the sake of clarity.
myself I still don't like that Python Tools For VS doesn't have GUI editor - so I decided to try using SharpDevelop - i had the exact above problem - but just found useful the following thread (answered by Matt Ward too - thank you and cheers!) http://community.sharpdevelop.net/forums/p/16639/45253.aspx
so, first of all I too had some default Bitmaps on ToolStripButtons, which were causing the exception in the beginning that flashed and went away - i saw the exception by going to command prompt, in the place where the project was and invoking ipy Program.py there (i found out afterwards that actually sharpdevelop compiles stuff - didn't realize that with VS)
then I was able to actually debug and hit breakpoints by actually not choosing Debug, but Step Into. it's a bit cumbersome, not knowing where the program will crash etc. and trying various breakpoints etc. but I really like the GUI designer in SharpDevelop, it's really neat, and i was apalled at the fact that it wasn't in VS+IronPython..
and yeah. the Watches etc. don't work quite often and cause exceptions in SharpDevelop itself - so i won't rely on them - but ok - this won't matter to me, much, ... i hope :P
Upvotes: 0
Reputation: 47967
The IronPython support in SharpDevelop is fairly basic and has lots of limitations.
I would look at using Python Tools for Visual Studio instead which is free, open source and maintained by a team at Microsoft. It has better code completion and debugging support.
The only things it does not have when compared with SharpDevelop are:
Upvotes: 1