question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Debugging unit tests hangs indefinitely

See original GitHub issue

Environment data

  • VS Code version: 1.21.0 x64
  • Extension version (available under the Extensions sidebar): Python 2018.2.1
  • OS and version: Windows 10
  • Python version: 2.7.14

Actual behavior

When clicking Debug Test nothing happens, except showing the Running Tests throbber at the bottom of the window indefinitely.

image

Expected behavior

Debugging line-by-line using breakpoints.

Steps to reproduce:

  1. I set up a minimal repo to reproduce this: https://github.com/veuncent/vsc-debug-test
  2. Open the folder in VSC
  3. Open the test.py file
  4. Click Debug Test above the testSomeService function

Logs

Output of Python Test Log at startup of VSC: Output 1.txt

No output is given when using the Debug Test text button above the testSomeFunction function.

Output after running a unit test using the Run Test button above the testSomeFunction function:

----------------------------------------------------------------------
Ran 1 test in 0.019s

OK

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

1reaction
veuncentcommented, Mar 21, 2018

Works for me as well, thanks @DonJayamanne !

On Wed, Mar 21, 2018 at 2:50 PM, Martin notifications@github.com wrote:

Yeah it works for me with pytest 😃 Thanks @DonJayamanne https://github.com/donjayamanne !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/vscode-python/issues/1009#issuecomment-374943178, or mute the thread https://github.com/notifications/unsubscribe-auth/AHhxWwB08N3ZVOdE00v5s__ypcXQG_qjks5tglqugaJpZM4Skqjv .

1reaction
jitbasemartincommented, Mar 21, 2018

Yeah it works for me with pytest 😃 Thanks @DonJayamanne !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging hangs indefinitely when debugging Gradle tests if ...
Debugging hangs indefinitely when debugging Gradle tests if no matching tests are found ; Project, IntelliJ IDEA ; Priority, Normal N ; Type,...
Read more >
node.js - jest hangs indefinitely, runs no tests - Stack Overflow
When debugging to try and get the tests to run, I nuked my node modules and did a fresh install. Only after adding...
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 >
Why Jest freezes after tests run? (Jest hangs indefinitely)
If you noticed that Jest (npm / yarn) test hang at the end of the test execution while you run tests in parallel...
Read more >
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found