Wing Tips: Moving the Program Counter in Wing's Python Debugger

May 12, 2020


This Wing Tip describes how to move the program counter while debugging Python code in Wing Personal and Wing Pro. This is a good way to go back and re-execute previously visited Python code, in order to trace through to the cause of a bug without having to restart the debug process.

To move the program counter, the debugger must be running and paused or stopped at a breakpoint. Then right-click on the target line in the editor and select Move Program Counter Here:

Move Program Counter

Shown above: Right-click to select Move Program Counter Here, then continue stepping with Step Over and Step Into in the toolbar.

Limitations: Due to the way Python is implemented, the program counter can only be moved within the current inner-most stack frame and it may not be moved within an exception handler, after an exception has been raised but not yet handled.



That's it for now! We'll be back soon with more Wing Tips for Wing Python IDE.

As always, please don't hesitate to email support@wingware.com if you run into problems or have any questions.



Share this article: