Home » Support » Index of All Documentation » Wing Pro Reference Manual » Trouble-shooting Guide » Trouble-shooting Failure to Debug »

Failure to Stop on Breakpoints or Show Source Code


There are several reasons why Wing may fail to stop on breakpoints or fail to show the Python source code when the breakpoint is reached:

Missing or Incorrect Source File Names -- The most common cause of failure to stop on breakpoints or to bring up source windows while stopping or stepping through code is a mismatch between the file name that is stored in the *.pyc file and the actual location of the *.py source file.

This can be caused by (1) not saving before you run in the debugger, (2) using partial path names on PYTHONPATH or when invoking a script from the command line (the partial path stored in the *.pyc file may become invalid if current directory changes), (3) moving around the *.pyc file after they are created, or (4) using compileall.py to create *.pyc files from source. The easiest way to solve this is to use only full paths on PYTHONPATH and remove any suspect *.pyc files.

Concurrent Processes -- Wing may fail to stop when debugging an application that gets invoked repeatedly in separate processes, for example a CGI script invoked multiple times from a browser as part of a page load. This is because the debugger can only debug one process at a time. If the debugger is already connected to one process, the second and later processes will not be debugged and thus may miss breakpoints.

Other Problems -- Less common causes of this problem are (1) running Python with the -O optimization option, (2) running Python with psyco or other optimizer, (3) overriding the Python __import__ routine, (4) adding breakpoints after you've started debugging an application that spends much of its time in C/C++ or other non-Python code, and (5) on Windows, using symbolic links to directories that contain your source code files.

For more information, see the Debugger Limitations section.

Failure to Stop on Breakpoints or Show Source Code