如何使用PIP使用调试信息来编译Python扩展



我有python中扩展程序的源代码。我想在调试时看到该扩展的调试符号。我该如何告诉PIP进行编译和链接我的扩展名符号?

(最好是平台不可知论,其他Linux)

您需要在软件包安装过程中使用--debug标志调用setup.pybuild命令。可以使用--global-option使用pipsetup.py的其他标志:

pip install --no-binary :all: --global-option build --global-option --debug PACKAGE

如果错误,请尝试升级pipsetuptools

pip install -U setuptools
pip install -U pip

我在乔纳森·兰格(Jonathan Lange)的此博客文章中找到了此信息:https://jml.io/2015/08/debugging-python-withon-with-with-gdb.html

最新更新