Search code examples
pythonpycharmpytest

Can PyCharm drop into debug when py.test tests fail


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

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


Solution

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