Unable to debug in pycharm with pytest

后端 未结 5 690
天命终不由人
天命终不由人 2021-02-01 00:56

I cannot debug in PyCharm using py.test. All the test suite is running ok in \"Debug mode\" but it doesn\'t stop on breakpoints.

I also have py

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-01 01:31

    The root issue is debugging does not work if you have coverage enabled by default (usually on pytest.ini).

    To disable just on pycharm, just add --no-cov on the Additional Arguments on the Run/Debug Configurations.
    Update Templates -> Python tests -> pytest, so every new test gets this configuration.
    After this, delete your current debug settings and redebug it.

    Pycharm 2018.3.x (still works in 2020.x)

提交回复
热议问题