How do I debug code when Python is compiled –with-pydebug?
The dbgtracer module shipped with Wing IDE will not run under a copy of Python that is compiled with the –with-pydebug option because the InitModule symbol is purposely defined differently when Python is compiled with this option. See the end of Include/modsupport.h in your Python sources for details. The only solution is to recompile Wing’s dbgtracer extension module against Python sources configured with the –with-pydebug option. Recompiling the debug server is described in the Debugger chapter of the manual. Note that running the IDE with a copy of Python compiled this way requires that you run it with the –verbose option (Posix) or use console_wing.exe (Windows) so you can respond to the “Print left references? [ny]” queries that will appear in the console window from which you launched Wing IDE, and in the console window for the debug process.