New submission from Jeff Moguillansky <jmogui...@gmail.com>:

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.

----------
components: C API
messages: 384853
nosy: jmoguill2
priority: normal
severity: normal
status: open
title: Debugging native Python modules on Windows with Visual Studio Toolchain
type: compile error
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42894>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to