Skip to content

Commit

Permalink
Add sample error a user might encounter
Browse files Browse the repository at this point in the history
  • Loading branch information
colinodell authored and ionelmc committed Jul 21, 2022
1 parent 4870f99 commit e31f3e9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/debuggers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ Debuggers and PyCharm
When it comes to TDD one obviously would like to debug tests. Debuggers in Python use mostly the sys.settrace function
to gain access to context. Coverage uses the same technique to get access to the lines executed. Coverage does not play
well with other tracers simultaneously running. This manifests itself in behaviour that PyCharm might not hit a
breakpoint no matter what the user does. Since it is common practice to have coverage configuration in the pytest.ini
breakpoint no matter what the user does, or encountering an error like this::

PYDEV DEBUGGER WARNING:
sys.settrace() should not be used when the debugger is being used.
This may cause the debugger to stop working correctly.

Since it is common practice to have coverage configuration in the pytest.ini
file and pytest does not support removeopts or similar the `--no-cov` flag can disable coverage completely.

At the reporting part a warning message will show on screen::
Expand Down

0 comments on commit e31f3e9

Please sign in to comment.