debug test is hanging
See original GitHub issueEnvironment data
- VS Code version: 1.30.1
- Extension version (available under the Extensions sidebar): 2018.12.1
- OS and version: Ubuntu 16.04
- Python version (& distribution if applicable, e.g. Anaconda): anaconda Python 3.6.7 64 bit
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda
- Relevant/affected Python packages and their versions: pytest 3.9.3
Expected behaviour
After setting a breakpoint in single test, when clicking “Debug Test” above the test, it should stop at the breakpoint.
Actual behaviour
VS Code launches the debugging tool bar and it hangs there. Run Test works properly.
Steps to reproduce:
Simply try to debug test in the described environment with pytest.
Logs
Output for Python
in the Output
panel (View
→Output
, change the drop-down the upper-right of the Output
panel to Python
)
Nothing is shown.
Output from Console
under the Developer Tools
panel (toggle Developer Tools on under Help
; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging
)
Nothing is written when clicking debug in developer tools console.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:19 (6 by maintainers)
Top Results From Across the Web
Visual Studio hangs when debugging a unit test
When debugging a unit test, Visual studio hangs until either the test ends or testhost.exe is killed. I'm using NUnit for unit testing,...
Read more >Unit-test passes in Debug, but hangs when Run - Stack Overflow
I have a unit test that keeps getting stuck in Run Mode. When I run the same test in Debug, with no breakpoints,...
Read more >How to debug freezing JUnit tests | by Piotr Zawadzki - Medium
On a CI server if a test hangs for a while but resumes eventually we can inspect JUnit reports and check if individual...
Read more >How To Debug A Hanging Test Using Pytest - PyBites
Today a wanted to share a neat trick that might save you some headache: debugging a hanging test.
Read more >Debugging Jest unit tests hangs
5. Running a jest test seems to work as expected, but when I switch to debug the same test, it hangs. I have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m also facing this problem with one of my projects. Impossible to start test debugging.
I’m working on Linux too and can reproduce the issue with @jruizaranguren environment.
I have reproduced the issue and upload the required files to this repo.
Steps to reproduce
Then, set a breakpoint in test_debugging.py::test_does_not_set_breakpoints.
Additional info
We reproduce the issue in vscode 1.30.1, but it works in versions 1.21.1 and 1.25.1.