Enable Debug Mode on Windows with Visual Studio Compiler
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Hi,
I'd like to enable debug mode in my python module, using visual studio toolchain.
The python module calls native C / C++ code via cython.
Currently I use the following approach:
- extract the output from running python.exe setup.py build --compiler=msvc
- change /Ox to /Od (disable compiler optimization)
- add /DEBUG flag to linker flags
Can you help guide me what is the best approach?
Currently I build the python module's native code in "Release" mode with debug information enabled and optimization disabled.
If I build in Debug mode I get issues when loading third-party python modules (using pip): they are prebuilt in release mode.
So I use release mode but enable debug symbols, etc.
There's two issues:
- lack of debug-mode python modules in pip, on Windows platform
- need ability to modify compiler / linker flags in setuptools
Thanks,
Jeff
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the setup.py build --compiler=msvc command described in the report and trace how setuptools handles the MSVC compiler and linker flags. Compare the requested /Ox, /Od, and /DEBUG behavior with the current build path; done means a supported way to configure these flags without editing extracted command output, while preserving compatibility with pip-installed modules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, python
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100