Skip to content

debug test is hanging #3869

Description

Environment 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.

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Jan 4, 2019
  2. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Jan 7, 2019
  3. brettcannon commented on Jan 8, 2019

    @brettcannon
    Member

    I can't reproduce:
    image

    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 conda). If you want you can try to provide more info about how it is hanging and we can see if there's something obvious.

  4. ghost removed on Jan 8, 2019
  5. jruizaranguren commented on Jan 9, 2019

    @jruizaranguren
    Author

    Is there any way to increase the timeout so I can confirm the issue?

  6. jruizaranguren commented on Jan 9, 2019

    @jruizaranguren
    Author

    I have reproduced the issue and upload the required files to this repo.

    Steps to reproduce

    > create conda environment from file: conda env create -f issue3869_env.yml
    > source activate issue3869
    > code .
    

    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.

  7. brettcannon commented on Jan 9, 2019

    @brettcannon
    Member

    jruizaranguren (@jruizaranguren) thanks for the reproducer. We will give it a try and get back to you.

  8. 20 remaining items

  9. jxramos commented on May 3, 2019

    @jxramos

    This behavior no longer appears to reproduce after the recent upgrade:

    Code Version 1.33.1 (1.33.1)
    Python Extension: 2019.4.12954
    

    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 Start without debugging to shake out any syntax errors before reattempting a debug session. I'd also invoke my scripts to trigger them to print their help messages to ensure syntax errors didn't slip through. There was a certain reproducible behavior around syntax errors and hanging the debugger. I haven't seen it recently however.

  10. jruizaranguren commented on Aug 12, 2019

    @jruizaranguren
    Author

    I'm experiencing the same issue with last versions:

    Code Version: 1.36.1
    Python Extension: 2019.8.29288
    Anaconda Extension Pack: 1.0.1

    Any hint? Is it just with complex environments?

  11. jbarbadillo commented on Oct 15, 2019

    @jbarbadillo

    I am experiencing same issue with last versions too.

    Code Version: 1.38.0

  12. vgonisanz commented on Oct 15, 2019

    @vgonisanz

    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
    Python Version: Python 3.6.9 :: Anaconda, Inc.

  13. marsmith commented on Oct 16, 2019

    @marsmith

    I'm having the same issue. Additionally, I can't seem to run individual tests. They are just hanging with the 'loading' spinner. This was working fine before 1.39.1

    image

  14. luabud commented on Oct 25, 2019

    @luabud
    Member

    Marty (@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?

  15. luabud commented on Apr 16, 2020

    @luabud
    Member

    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! 😊

  16. luabud commented on Mar 16, 2021

    @luabud
    Member

    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 :)

  17. locked as resolved and limited conversation to collaborators on Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-debuggingbugIssue identified by VS Code Team member as probable buglinux

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions