Download A4 - Wingware Python IDE
Transcript
Advanced Debugging Topics (5) For code that spends much of its time in C/C++ without calling Python at all, for example as in a GUI main loop, the debugger may not reliably stop at breakpoints added during a run session, and may not respond to Pause requests. See section Debugging Non-Python Mainloops for more information. (6) You cannot use pdb or other debuggers in code that you are running within the Wing debugger. The two debuggers conflict because they attempt to use the same debugger hooks in the Python interpreter. (7) If you override __import__ in your code, you will break the debugger's ability to stop at breakpoints unless you call the original __import__ as part of your code whenever a module is actually imported. If you cannot call the original __import__ for some reason, it may be possible to instead use wingdbstub and then call wingdbstub.debugger.NotifyImport(mod) from your import handler (where mod is the module that was just imported). (8) If you set __file__ in a module's name space to a value other than its original, Wing will be unable to stop at breakpoints in the module and may fail to report exceptions to the IDE's user interface. (9) If you use an extension module to call C/C++ level stdio calls instead of using the Python-level facilities, the debug process will remain unresponsive to Wing IDE while waiting for keyboard input, I/O redirection to the Debug Probe in Wing Pro will fail, and you may run into out-of-order character reads in some cases. Details can be found in Debug Process I/O. (10) Using partial path names in module __file__ attribute can in rare cases cause Wing to fail to stop on breakpoints and exceptions, to fail to display source files, or to confuse source files of the same name. A partial path name may end up in __file__ only when (a) invoking Python code with a partial path name, for example with python myfile.py instead of python /path/to/myfile.py, (b) sending partial path names into exec, (c) using partial path names in your PYTHONPATH or sys.path, or (d) using compileall.py or similar tool to compile modules with a partial path name. Because Wing does everything possible to avoid this problem in practice, it actually only occurs in the following rare cases: • When modules are loaded with partial path names and os.chdir() is called before debugging is started. This is only possible when using wingdbstub or otherwise starting debug after your debug process is started. • When modules are loaded with partial path names and os.chdir() is called after wingdbstub.debugger.SuspendDebug() and before wingdbstub.debugger.ResumeDebug(). • When modules are loaded with partial path names and removed from sys.modules before the debugger is started or while debugging is suspended. 124
Related documents
A4 - Wingware Python IDE
US Letter - Wingware Python IDE
A4 - Wingware Python IDE
A4 - Wingware Python IDE
A4 - Wingware Python IDE
Wing IDE Personal Benutzerhandbuch
Product Description II
A4 - Wingware Python IDE
Wing IDE Personal Reference Manual
A4 - Wingware Python IDE
rituals Documentation
GNU Emacs Manual