-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug test is hanging #3869
Comments
If you can replicate with a simpler test then let us know and we can re-open this issue. Otherwise it sounds like the connection itself is timing out which often happens if the setup time of your test takes a long time and the debugger can't attach in time (which has been known to happen under |
Is there any way to increase the timeout so I can confirm the issue? |
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 infoWe reproduce the issue in vscode 1.30.1, but it works in versions 1.21.1 and 1.25.1. |
@jruizaranguren thanks for the reproducer. We will give it a try and get back to you. |
I can't reproduce the environment on Windows, so a teammate running Linux will need to give it a try. And so no one else has to look it up, running |
This does indeed reproduce on Linux. I have grabbed a log file by running the test in the debugger (I added one line: Settings.json file: |
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. |
With the following system configuration
And @jruizaranguren environment I have the same problem with debugging. Before version 1.30.1 I could debug perfectly. |
This reproduces on MacOS as well.
One more point to update, it does appear to be source specific in some way, I just crafted a simple Greenfield python module and the debugger is playing fine there. In my more complex modules its hanging and the debugger's debug log output doesn't appear to have anything too revealing when searching for keywords |
This behavior no longer appears to reproduce after the recent upgrade:
However it seems to have been replaced with issue 5540. I may add some clarification too with debug behavior I witnessed in the past. Whenever I made a python syntax error if I attempted to run the debugger it would hang indefinitely and I'd have to force kill the debug session. I would then often invoke |
I'm experiencing the same issue with last versions: Code Version: 1.36.1 Any hint? Is it just with complex environments? |
I am experiencing same issue with last versions too. Code Version: 1.38.0 |
I have the same problem. If I click on debug test, then running test message appear at the bottom, and after a second, no tests ran. No debug running works. Code Version: 1.39.1 |
@marsmith the second issue you mentioned is this one: microsoft/vscode#82629. It needs to be fixed in VS Code. For the others in this thread, I believe these issues may be conda issues. Which version of conda are you using? |
It's still happening all the time on MacOS. Python extension 2020.3.71659, Python 3.7.7, VS Code 1.44.1. I don't use conda. |
Hi @digger, would you mind filing a separate issue with repro steps and any screenshots that may seem relevant? I think this may be happening for a different reason, as we started using a new debugger. Thanks! 😊 |
Hi @luabud, I filed #11219. I've been using vscode for about a year and this has always been an issue with the python debugger. |
This issue seems to be stale, so I'm closing it. If anyone still has any issues please do file a separate bug report! Thank you :) |
Environment data
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 theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: