Unable to debug in pycharm with pytest

For my situation, I found what the problem is:

If there is --cov in pytest.ini, then breakpoints in pycharm won’t work, after deleting all --cov in pytest.ini, the breakpoints in pycharm can work.

Reason:

“The coverage module and pycharm’s debugger use the same tracing api (sys.settrace) – they don’t work together. ” — https://github.com/pytest-dev/pytest-cov/issues/131

References:

How to debug py.test in PyCharm when coverage is enabled

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)