Pycharm does not recognize breakpoints in files without testing

Using Pycharm to record a server.

I have unittests using the 'unittest' library from Python.

I just ran the tests and everything was fine, I could set breakpoints anywhere in the code. Yesterday I started to start the server through the debugger. I found that my breakpoints no longer work. Visually, they are still present, they look / behave in every way, like a working break point, except that in fact this does not lead to a break in execution, they are simply ignored (as if they were disabled).

Today, when I tried to run the tests again, I observe the same behavior in all files, except for those that are in my test library.

I tried the experiment by adding a new file to the server code with a simple function. The breakpoint in the function, the function of calling from the test, starting the test through the debugger, without interruption. I copied the file to my "tests" directory, reset the breakpoint in the function, changed the "import" operator to indicate the new location of the test file, the running tests. Now it stops at a breakpoint in the file.

I tried every basic “sanity check” that I can think of: exit PyCharm. Reinstall PyCharm. Remove PyCharm preferences. Reboot. I get the same behavior anyway.

For what it's worth, "run to cursor" demonstrates the same problem: in nothing but a test file, it just starts without stopping.

, . , , .

+5
2

Kinda sorta .

Run- > Edit Configurations .

": :" foo/bar/baz/my_project/tests.

: "", "my_project" .

foo/bar/baz/my_project. , , .

: "tests" .

, , , , ... .

+2

, , :

  • 1.0 1.0.1 --- . , 1.1.1. 1.2.
  • , , , PyCharm.
  • , , JetBrains , ping / YouTrack.

Cheers, Rob

+1

All Articles