使用python调试器(pdb)时调试cython代码(.pyx)-最佳实践 [英] Debug cython code (.pyx) when using the python debugger (pdb) - Best Practice

查看:619
本文介绍了使用python调试器(pdb)时调试cython代码(.pyx)-最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读 Cython调试,设置了断点,并且< a href = https://groups.google.com/forum/#!topic/apam-python-users/6rsRwcCAms4 rel = noreferrer> https://groups.google.com/forum/#!topic/ apam-python-users / 6rsRwcCAms4 ,想知道调试从python代码调用的cython代码时最好的工作流程是什么?

I have read Cython debugging, put a break point, and https://groups.google.com/forum/#!topic/apam-python-users/6rsRwcCAms4 and wondering what the best workflow is when debugging cython code that is called from python code?

理想情况下,我想跨步从我的IDE(pycharm)启动的python调试会话期间,将其转换为.pyx文件,但这似乎是不可能的。将pyx文件进行cython化后,是否有可能编译调试信息,以便调试器可以介入?

Ideally I would like to step into .pyx files during a python debugging session initiated from my IDE (pycharm), but it seems this is impossible. Isn't it possible to compile debug information when the pyx files are cythonized so that the debugger can step in?

如果无法实现,还有哪些选择? (除了不使用cython!)?

If this can't be achieved, what are the alternatives (apart from not using cython!)?

此问题专门询问如何进入cython代码,尽管它类似于Cython& Python Project Test Driven Development和.pyx文件结构建议,它是不一样的。

As this question specifically asks how to step into cython code, although it is similar to Cython & Python Project Test Driven Development and .pyx file structure advice, it is not the same.

推荐答案

官方方式是您的最佳选择。如果有一个简单的选择,那很好,但是您从链接中包含了这里似乎没有。此 wiki 文档似乎还提供了一些其他提示,说明官方文档已丢失。

It seems like the official way is your best option. It would be great if there were an easy alternative but from the link you included here it seems like there isn't. This wiki document seems to have a few additional tips that the official doc is missing.

这篇关于使用python调试器(pdb)时调试cython代码(.pyx)-最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆