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 Remote Debugging Not working with 3.9.3 #580

Closed
quoctruong opened this issue Apr 3, 2021 · 5 comments
Closed

Python Remote Debugging Not working with 3.9.3 #580

quoctruong opened this issue Apr 3, 2021 · 5 comments

Comments

@quoctruong
Copy link

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.

@sco1
Copy link

sco1 commented Apr 4, 2021

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

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python Apr 5, 2021
@AlbertoFabbri93
Copy link

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,
        }
    ]
}

@AlbertoFabbri93
Copy link

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.

@Tom-Brouwer
Copy link

Tom-Brouwer commented Apr 6, 2021

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

@karthiknadig
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants