当 py.test 测试失败时,PyCharm 是否可以进入调试状态 [英] Can PyCharm drop into debug when py.test tests fail

查看:46
本文介绍了当 py.test 测试失败时,PyCharm 是否可以进入调试状态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用 py.test 运行测试时,有一个 --pdb 选项可以在失败时输入 pdb.

When running tests with py.test there is a --pdb option to enter pdb on failure.

在 PyCharm 中运行相同的测试时,是否有类似的方式进入调试器?

Is there a similar way to enter the debugger when running the same test from within PyCharm?

推荐答案

有一个py.test插件,pytest-pycharm,这将在测试发出未捕获的异常时停止 PyCharm 调试器.

There is a py.test plugin, pytest-pycharm, that will halt the PyCharm debugger when a test emits an uncaught exception.

这篇关于当 py.test 测试失败时,PyCharm 是否可以进入调试状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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