在 Pydev 中调试时查看调用堆栈

发布于 2024-12-21 23:00:22 字数 39 浏览 4 评论 0原文

在 Pydev 中调试 python 时有没有办法查看调用堆栈?

Is there a way to see the call stack while debugging python in Pydev?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

行雁书 2024-12-28 23:00:22

这是“调试”透视图的“调试”视图:

在此处输入图像描述

您可以看到我处于一个 failUnlessEqual 方法中,由 test_01a 调用,由 new_method 调用...

This is the "Debug" view of the "Debug" perspective :

enter image description here

You can see that I was inside a failUnlessEqual method, called by test_01a, called by a new_method...

枫以 2024-12-28 23:00:22

要获得完整的堆栈跟踪,您可以添加以下监视表达式:

[stackLine for stackLine in __import__("traceback").format_stack() if not 'pydev' in stackLine]

我不确定是否有更好的方法来获得完整堆栈跟踪...

To have the complete stacktrace you could add the following watch expression:

[stackLine for stackLine in __import__("traceback").format_stack() if not 'pydev' in stackLine]

I am not sure if there is a better way to have the complete stacktrace...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文