如何处理调用 pdb 的脚本错误?

发布于 2025-01-11 13:05:44 字数 180 浏览 4 评论 0原文

我们编写运行时间较长的 python 测试脚本,因此我们尝试使脚本能够自动处理出现的错误并继续执行。我必须在我的整体测试流程中包含一个我无法控制的脚本,该脚本在遇到错误时启动 python 调试器。这会导致整个测试脚本停止以等待用户输入。

有没有一种方法可以调用脚本,以防止它在遇到错误时陷入 pdb,即使该脚本正在尝试使用调试器?

We write python test scripts with long run times, so we try to enable our scripts to handle errors that arise automatically and proceed. I have to include in my overall test flow a script that I have no control over, which initiates python debugger when it hits an error. This results in the whole test script halting to wait for user input.

Is there a way to call a script that prevents it from falling into pdb when it hits an error, even if that script is trying to engage the debugger?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文