Skip to content
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

Python debugger hangs when stepping through the code #131

Closed
ghost opened this issue Apr 16, 2020 · 4 comments
Closed

Python debugger hangs when stepping through the code #131

ghost opened this issue Apr 16, 2020 · 4 comments

Comments

@ghost
Copy link

ghost commented Apr 16, 2020

Python debugger hangs when stepping through the code

This seems to be a duplicate of microsoft/vscode-python#3342

Environment data

  • VS Code version: 1.44.1
  • Extension version (available under the Extensions sidebar): 2020.3.71659
  • OS and version: macOS Mojave 10.14.6
  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.7, installed through Homebrew
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A
  • Relevant/affected Python-related VS Code extensions and their versions: Python extension
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version vscode-python#3977): "Jedi Enabled" is marked in the settings
  • Value of the python.languageServer setting: Microsoft or Jedi (reproducible in both cases)

Expected behaviour

The debugger allows to step through the Python code

Actual behaviour

Python debugger hangs on random lines of code.

Steps to reproduce:

It seems to reproduce on any code, just by stepping through the code. E.g. this trivial script does get stuck when stepping with the debugger:

#!/usr/bin/env python

def gcd(a, b):
    print("gcd(%s, %s)" % (a, b))
    if b == 0: 
        return a
    return gcd(b, a % b)

print(gcd(6, 9))
print(gcd(9, 6))

Logs

There's nothing in the Output panel.

@ghost
Copy link
Author

ghost commented Apr 16, 2020

I found that this happens only when I have some expressions in the "WATCH" list. I can't reproduce it with the empty watch list. It is reproducible with the expression list below. All expressions are invalid as there are no such variables in the script that's being debugged.

  1. values
  2. [x for x in filter(lambda x: x>0, values)]
  3. self.id

@eager-seeker
Copy link

eager-seeker commented Apr 20, 2020

Also getting this. Definitely relates to adding watches. 1 or 2 can be added without problems, but then a 3rd doesn't appear and step debugger won't continue.
MacOS: 10.14.6
VS Code 1.44.2.
conda 4.8.3
Extensions:

formulahendry.dotnet-test-explorer@0.7.1
James-Yu.latex-workshop@8.8.0
janisdd.vscode-edit-csv@0.2.6
k--kato.docomment@0.1.9
ms-dotnettools.csharp@1.21.17
ms-mssql.mssql@1.9.0
ms-python.anaconda-extension-pack@1.0.1
ms-python.python@2020.3.71659
redhat.vscode-yaml@0.7.2
streetsidesoftware.code-spell-checker@1.8.0
tecosaur.latex-utilities@0.3.6

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Apr 20, 2020
@int19h
Copy link
Contributor

int19h commented Apr 20, 2020

The symptoms match #108 perfectly. We have a fix for that in the insiders version of the extension - please give that a try, and let me know if that helps.

@ghost
Copy link
Author

ghost commented Apr 20, 2020

@int19h, thanks, the workaround mentioned in #108 did help.

@int19h int19h closed this as completed Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants