PyCharm ignores breakpoints for py.test
Hi. It appears that PyCharm is ignoring breakpoints in pytest tests and in code that those tests cover. Here's some debug info from a pytest test file in which a put a breakpoint of the test file and every line of the python code it tests. The end result is that execution does not stop on any of the break points the tests run, pass that the script exits with a 0 status.
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 "/Applications/PyCharm CE.app/helpers/pydev/pydevd.py" –multiproc –client 127.0.0.1 –port 51076 –file "/Applications/PyCharm CE.app/helpers/pycharm/pytestrunner.py" -p pytest_teamcity /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py
Testing started at 4:13 PM ...
Connected to pydev debugger (build 135.1057)
Started in multiproc mode
('Connecting to ', '127.0.0.1', ':', '51076')
('Connected.',)
received >>99 -1 51077
<<
Received command: ??? 99 -1 51077
Received port 51077
pydev debugger: process 1372 is connecting
('Connecting to ', '127.0.0.1', ':', '51077')
('Connected.',)
received >>501 1 0.1 UNIX
<<
Received command: CMD_VERSION 501 1 0.1 UNIX
sending cmd –> CMD_VERSION 501 1 @@BUILD_NUMBER@@
received >>111 3 python-line /Users/stevebaker/Work2/schema_parse/lib/test/test_schema_parse.py 65 None None
<<
Received command: CMD_SET_BREAK 111 3 python-line /Users/stevebaker/Work2/schema_parse/lib/test/test_schema_parse.py 65 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/lib/test/test_schema_parse.py - line:65 - func_name:None
received >>111 5 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 3 None None
111 7 python-line /Users/stevebaker/Work2/schema_parse/lib/schema_parser.py 32 None None
111 9 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 4 None None
111 11 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 2 None None
<<
Received command: CMD_SET_BREAK 111 5 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 3 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:3 - func_name:None
Received command: CMD_SET_BREAK 111 7 python-line /Users/stevebaker/Work2/schema_parse/lib/schema_parser.py 32 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/lib/schema_parser.py - line:32 - func_name:None
Received command: CMD_SET_BREAK 111 9 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 4 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:4 - func_name:None
Received command: CMD_SET_BREAK 111 11 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 2 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:2 - func_name:None
received >>111 13 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 7 None None
111 15 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 9 None None
111 17 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 14 None None
111 19 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 1 None None
111 21 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 15 None None
111 23 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 1 None None
111 25 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 10 None None
<<
Received command: CMD_SET_BREAK 111 13 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 7 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/timestamp.py - line:7 - func_name:None
Received command: CMD_SET_BREAK 111 15 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 9 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:9 - func_name:None
Received command: CMD_SET_BREAK 111 17 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 14 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:14 - func_name:None
Received command: CMD_SET_BREAK 111 19 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 1 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/timestamp.py - line:1 - func_name:None
Received command: CMD_SET_BREAK 111 21 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 15 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:15 - func_name:None
Received command: CMD_SET_BREAK 111 23 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 1 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:1 - func_name:None
Received command: CMD_SET_BREAK 111 25 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 10 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:10 - func_name:None
received >>111 27 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 5 None None
111 29 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 7 None None
111 31 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 16 None None
111 33 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 8 None None
111 35 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 17 None None
111 37 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 2 None None
111 39 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 5 None None
111 41 python-line /Users/stevebaker/Work2/schema_parse/test.py 2 None None
111 43 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 12 None None
<<
Received command: CMD_SET_BREAK 111 27 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 5 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/timestamp.py - line:5 - func_name:None
Received command: CMD_SET_BREAK 111 29 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 7 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:7 - func_name:None
Received command: CMD_SET_BREAK 111 31 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 16 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:16 - func_name:None
Received command: CMD_SET_BREAK 111 33 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 8 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:8 - func_name:None
Received command: CMD_SET_BREAK 111 35 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 17 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:17 - func_name:None
Received command: CMD_SET_BREAK 111 37 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 2 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/timestamp.py - line:2 - func_name:None
Received command: CMD_SET_BREAK 111 39 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 5 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:5 - func_name:None
Received command: CMD_SET_BREAK 111 41 python-line /Users/stevebaker/Work2/schema_parse/test.py 2 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/test.py - line:2 - func_name:None
Received command: CMD_SET_BREAK 111 43 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 12 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:12 - func_name:None
received >>111 45 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 18 None None
122 47 BaseException 0 1
101 49
<<
Received command: CMD_SET_BREAK 111 45 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 18 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:18 - func_name:None
Received command: CMD_ADD_EXCEPTION_BREAK 122 47 BaseException 0 1
Exceptions to hook on terminate: {u'BaseException': <pydevd_breakpoints.ExceptionBreakpoint instance at 0x10a4c4560>}
Received command: CMD_RUN 101 49
sending cmd –> CMD_THREAD_CREATE 103 2 <xml><thread name="pydevd.reader" id="-1"/></xml>
sending cmd –> CMD_THREAD_CREATE 103 4 <xml><thread name="pydevd.writer" id="-1"/></xml>
============================= test session starts ==============================
platform darwin – Python 2.7.6 – py-1.4.25 – pytest-2.6.3 – /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
plugins: cov, incremental, ordering, xdist, teamcity-messages
collected 1 items
plugins/test/test_timestamp.py::test_timestamp PASSED
--- generated xml file: /Users/stevebaker/Work2/schema_parse/build/junit.xml —
--------------- coverage: platform darwin, python 2.7.6-final-0
Coverage HTML written to dir build/htmlcoverage
Coverage XML written to file build/coverage.xml
=========================== 1 passed in 0.11 seconds ===========================
No alive threads, finishing debug session
received >><<
Process finished with exit code 0
Everything was fine as early as yesterday afternoon and I've tried everything including deleting .idea, the pycharm prefs and cache directories and reinstalling pycharm so this is obviously something incredibly idiotic that I'm doing and has nothing to do with python, pycharm or pytest at all. Still I ask that someone show some charity and help the mentally challenged.
/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 "/Applications/PyCharm CE.app/helpers/pydev/pydevd.py" –multiproc –client 127.0.0.1 –port 51076 –file "/Applications/PyCharm CE.app/helpers/pycharm/pytestrunner.py" -p pytest_teamcity /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py
Testing started at 4:13 PM ...
Connected to pydev debugger (build 135.1057)
Started in multiproc mode
('Connecting to ', '127.0.0.1', ':', '51076')
('Connected.',)
received >>99 -1 51077
<<
Received command: ??? 99 -1 51077
Received port 51077
pydev debugger: process 1372 is connecting
('Connecting to ', '127.0.0.1', ':', '51077')
('Connected.',)
received >>501 1 0.1 UNIX
<<
Received command: CMD_VERSION 501 1 0.1 UNIX
sending cmd –> CMD_VERSION 501 1 @@BUILD_NUMBER@@
received >>111 3 python-line /Users/stevebaker/Work2/schema_parse/lib/test/test_schema_parse.py 65 None None
<<
Received command: CMD_SET_BREAK 111 3 python-line /Users/stevebaker/Work2/schema_parse/lib/test/test_schema_parse.py 65 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/lib/test/test_schema_parse.py - line:65 - func_name:None
received >>111 5 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 3 None None
111 7 python-line /Users/stevebaker/Work2/schema_parse/lib/schema_parser.py 32 None None
111 9 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 4 None None
111 11 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 2 None None
<<
Received command: CMD_SET_BREAK 111 5 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 3 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:3 - func_name:None
Received command: CMD_SET_BREAK 111 7 python-line /Users/stevebaker/Work2/schema_parse/lib/schema_parser.py 32 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/lib/schema_parser.py - line:32 - func_name:None
Received command: CMD_SET_BREAK 111 9 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 4 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:4 - func_name:None
Received command: CMD_SET_BREAK 111 11 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 2 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:2 - func_name:None
received >>111 13 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 7 None None
111 15 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 9 None None
111 17 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 14 None None
111 19 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 1 None None
111 21 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 15 None None
111 23 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 1 None None
111 25 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 10 None None
<<
Received command: CMD_SET_BREAK 111 13 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 7 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/timestamp.py - line:7 - func_name:None
Received command: CMD_SET_BREAK 111 15 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 9 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:9 - func_name:None
Received command: CMD_SET_BREAK 111 17 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 14 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:14 - func_name:None
Received command: CMD_SET_BREAK 111 19 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 1 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/timestamp.py - line:1 - func_name:None
Received command: CMD_SET_BREAK 111 21 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 15 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:15 - func_name:None
Received command: CMD_SET_BREAK 111 23 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 1 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:1 - func_name:None
Received command: CMD_SET_BREAK 111 25 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 10 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:10 - func_name:None
received >>111 27 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 5 None None
111 29 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 7 None None
111 31 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 16 None None
111 33 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 8 None None
111 35 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 17 None None
111 37 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 2 None None
111 39 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 5 None None
111 41 python-line /Users/stevebaker/Work2/schema_parse/test.py 2 None None
111 43 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 12 None None
<<
Received command: CMD_SET_BREAK 111 27 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 5 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/timestamp.py - line:5 - func_name:None
Received command: CMD_SET_BREAK 111 29 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 7 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:7 - func_name:None
Received command: CMD_SET_BREAK 111 31 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 16 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:16 - func_name:None
Received command: CMD_SET_BREAK 111 33 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 8 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:8 - func_name:None
Received command: CMD_SET_BREAK 111 35 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 17 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:17 - func_name:None
Received command: CMD_SET_BREAK 111 37 python-line /Users/stevebaker/Work2/schema_parse/plugins/timestamp.py 2 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/timestamp.py - line:2 - func_name:None
Received command: CMD_SET_BREAK 111 39 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 5 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:5 - func_name:None
Received command: CMD_SET_BREAK 111 41 python-line /Users/stevebaker/Work2/schema_parse/test.py 2 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/test.py - line:2 - func_name:None
Received command: CMD_SET_BREAK 111 43 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 12 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:12 - func_name:None
received >>111 45 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 18 None None
122 47 BaseException 0 1
101 49
<<
Received command: CMD_SET_BREAK 111 45 python-line /Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py 18 None None
Added breakpoint:/Users/stevebaker/Work2/schema_parse/plugins/test/test_timestamp.py - line:18 - func_name:None
Received command: CMD_ADD_EXCEPTION_BREAK 122 47 BaseException 0 1
Exceptions to hook on terminate: {u'BaseException': <pydevd_breakpoints.ExceptionBreakpoint instance at 0x10a4c4560>}
Received command: CMD_RUN 101 49
sending cmd –> CMD_THREAD_CREATE 103 2 <xml><thread name="pydevd.reader" id="-1"/></xml>
sending cmd –> CMD_THREAD_CREATE 103 4 <xml><thread name="pydevd.writer" id="-1"/></xml>
============================= test session starts ==============================
platform darwin – Python 2.7.6 – py-1.4.25 – pytest-2.6.3 – /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
plugins: cov, incremental, ordering, xdist, teamcity-messages
collected 1 items
plugins/test/test_timestamp.py::test_timestamp PASSED
--- generated xml file: /Users/stevebaker/Work2/schema_parse/build/junit.xml —
--------------- coverage: platform darwin, python 2.7.6-final-0
Coverage HTML written to dir build/htmlcoverage
Coverage XML written to file build/coverage.xml
=========================== 1 passed in 0.11 seconds ===========================
No alive threads, finishing debug session
received >><<
Process finished with exit code 0
Everything was fine as early as yesterday afternoon and I've tried everything including deleting .idea, the pycharm prefs and cache directories and reinstalling pycharm so this is obviously something incredibly idiotic that I'm doing and has nothing to do with python, pycharm or pytest at all. Still I ask that someone show some charity and help the mentally challenged.
Please sign in to leave a comment.