I have a question regarding debugging native Python modules on Windows, with Visual Studio toolchain:
Currently I have a native module (native C code), along with Python API bindings (via Cython), and finally Python code that invokes the native module. I also use various third-party python modules like Pillow, etc.
In order to debug on Windows, I have to use the following tricks:
1) Build the native module in Release Mode
2) Disable Compiler Optimization
3) Enable Debug symbols
I can't just use Python distutils out of the box, I have to manually modify the build commands to enable Debugging.
If I just try to build the native module in Debug mode, I get Visual Studio compile errors related to: not being able to mix code built with different C++ runtime libraries.
Some of the 3rd-party Python modules are only available as Release builds (not Debug builds).
I'm wondering if anyone has encountered a similar issue, and what's your advice?
On Linux, GNU toolchain, this isn't an issue. The toolchain lets you mix release and debug libraries, no problem.
|