我有python中扩展程序的源代码。我想在调试时看到该扩展的调试符号。我该如何告诉PIP进行编译和链接我的扩展名符号?
(最好是平台不可知论,其他Linux)
您需要在软件包安装过程中使用--debug
标志调用setup.py
的build
命令。可以使用--global-option
使用pip
到setup.py
的其他标志:
pip install --no-binary :all: --global-option build --global-option --debug PACKAGE
如果错误,请尝试升级pip
和setuptools
:
pip install -U setuptools
pip install -U pip
我在乔纳森·兰格(Jonathan Lange)的此博客文章中找到了此信息:https://jml.io/2015/08/debugging-python-withon-with-with-gdb.html