Skip to content

Python debugger hangs when stepping through the code #131

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions