[wingide-users] Edit-and-continue, what are the alternatives?

Wingware Support support at wingware.com
Thu Sep 22 10:54:58 EDT 2005

On Thu, 22 Sep 2005, Markus Meyer wrote:
> 1. From Visual C++, I know the Edit-and-Continue functionality. It 
> basically lets one fix the code while the app is running. Of course, 
> this doesn't work for large-scale changes, but a typo, or a wrong 
> condition in a for-loop can easily be fixed. Is it possible to do 
> something like this with Wing IDE, maybe by using the Debug console? If 
> not, is this planned?

We plan to look into adding this, and I think it's probably possible 
within certain limits.  Basically, we would have to recompile the 
appropriate code object(s) and replace (or mutate) them on the fly.

It's not something you could do manually by typing in the Debug Probe, 
although that's a good place to try out new code before you kill the 
debug process.  You can try stuff in the actual run environment and of 
course you can inspect the environment or APIS either with the other 
debugger tools or manually with dir() and so forth.

> 2. What do other users recommend in such a situation? I know that 
> writing unit tests for everything can lower the amount of debugging 
> needed for the full app, but then again, with the distributed 
> environment I have here, writing a "small" testcase for everything is 
> hardly possible.

Certainly, as the other poster suggested, breaking code down to be 
unit testable (even if you don't write all the tests right away) can 

One sort of crazy idea is to restructure your code so you can have it 
reload code modules on the fly.  I've really enjoyed debugging Wing 
scripts because they do this so I have a very quick edit/test 
turn-around.  I've even worked on some internals this way and just 
moved the code elsewhere when done.  However, there's a non-trivial 
amount of machinery underneath that detects changes, reloads modules, 
and makes sure that the whole thing is designed to avoid use of old 
code objects, data, etc.

Also, if you're issuing manual SQL commands to restore the database,
I'd say try to write a Python script that does that for you.  Then if 
you're doing a lot of other manual actions, you could tie those 
together with a custom script for Wing that runs your house keeping 
scripts and then starts/restarts debugging.  Scripting Wing is 
described here:


Well, I hope that helps.  In my experience, it definately is worth
taking steps for a short edit/test cycle -- the effort pays for itself 

Stephan Deibel

Wing IDE for Python
Advancing Software Development


More information about the wingide-users mailing list