Skip to content

Python Remote Debugging Not working with 3.9.3 #580

Closed

Description

Environment data

  • VS Code version: 1.53.2
  • Extension version (available under the Extensions sidebar): v2021.2.633441544
  • OS and version: Darwin x64 19.6.0
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.3

Expected behaviour

Breakpoint hits.

Actual behaviour

Breakpoint fails to hit.

Steps to reproduce:

  1. Create a simple test.py:
import time

while(True):
    print("fhello world")
    time.sleep(10)
  1. Create a launch.json for attach:
{
    "type": "python",
    "host": "localhost",
    "port": 5678,
    "name": "Launch",
    "request": "attach"
}
  1. Set Python Interpreter to Python 3.9.3 if not already done so.

  2. Launch the script with debugpy: python3 -mdebugpy --listen 5678 test.py.

  3. If we follow steps 1-5 with Python 2.7.16 instead, then the breakpoint is hit. Seems to work with 3.8 as well.

Activity

  1. sco1 commented on Apr 4, 2021

    @sco1

    Seeing the same behavior with local debugging as well after upgrading to Python 3.9.3 & using the default launch configuration

    Environment data

    • VS Code version: 1.55.0
    • Extension version (available under the Extensions sidebar): 2021.3.680753044
    • OS and version: Windows 10 Pro, 20H2 (19042.867)
    • Python version (& distribution if applicable, e.g. Anaconda): 3.9.3
    • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): system & virtualenv
    • Value of the python.languageServer setting: Pylance

    launch.json:

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Python: Current File",
                "type": "python",
                "request": "launch",
                "program": "${file}",
                "console": "integratedTerminal"
            }
        ]
    }

    edit: This appears to be solved in 3.9.4

  2. AlbertoFabbri93 commented on Apr 5, 2021

    @AlbertoFabbri93

    I am having the same problem with Python 3.9.3 inside a Debian-based Docker container.

    Environment data

    • VS Code version: 1.55.0
    • Extension version (available under the Extensions sidebar): 2021.3.680753044
    • OS and version: Windows 10 Home, 20H2 (19042.867)
    • Python version (& distribution if applicable, e.g. Anaconda): 3.9.3
    • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
    • Value of the python.languageServer setting: Pylance

    launch.json:

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Pig Game",
                "type": "python",
                "request": "launch",
                "program": "src/pig/main.py",
                "console": "integratedTerminal",
                "justMyCode": true,
                "stopOnEntry": true,
            }
        ]
    }
  3. AlbertoFabbri93 commented on Apr 6, 2021

    @AlbertoFabbri93

    I am having the same problem with Python 3.9.3 inside a Debian-based Docker container.

    Updating Python to the version 3.9.4 solved the problem.

  4. Tom-Brouwer commented on Apr 6, 2021

    @Tom-Brouwer

    I am having the same problem with Python 3.9.3 inside a Debian-based Docker container.

    Updating Python to the version 3.9.4 solved the problem.

    Exactly! I re-installed Vscode a couple of times, before realizing it wasn't the Vscode update that broke it, but the Python update...

    Anyway, for people working with Ubuntu, like me, enjoy the fun of compiling Python 3.9.4 from source as described as option 2 here, since the 'deadsnakes' ppa does not yet contain python 3.9.4...

  5. karthiknadig commented on Apr 8, 2021

    @karthiknadig
    Member

    This is due to an issue with Python 3.9.3, please update to 3.9.4.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions