microsoft / vscode-python-debugger

Python debugger (debugpy) extension for VS Code.
https://marketplace.visualstudio.com/items?itemName=ms-python.debugpy
MIT License
40 stars 17 forks source link

Python Debugger: "Timed out waiting for launcher to connect" #361

Open MJ1Peter opened 3 weeks ago

MJ1Peter commented 3 weeks ago

Having an issue working in VSCode (Version: 1.90.0) using Python 3.12.2 on Mac. Program (below) runs just fine from the terminal:

Program

import sys

print (len(sys.argv))
print (sys.argv)
if  len(sys.argv) < 3:
    print("specify <sheet-name> <operation> where operation is 'create', 'insert', show' or 'delete'")
    sys.exit(1)

print("argument list:", str(sys.argv))
sheetname =  sys.argv[1]
operation =  sys.argv[2]

From terminal

petermelo@Peters-MacBook-Pro Code % python3 -V 
Python 3.12.2
petermelo@Peters-MacBook-Pro Code % python3 Test3.py 
1
['Test3.py']
specify <sheet-name> <operation> where operation is 'create', 'insert', show' or 'delete'
petermelo@Peters-MacBook-Pro Code % 

However, when I try to debug it from VSCode I get the following: Image 6-8-24 at 10 19 AM

This is the config for launch.json im using:

`{

// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387

"version": "0.2.0",

"configurations": [
          {
            "name": "Python Debugger: Current File (Integrated Terminal)",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
          }
]

}`

MJ1Peter commented 3 weeks ago

I would also add that this runs no problem on Linux.

paulacamargo25 commented 2 weeks ago

Thanks for your bug report, could you send me the logs of the Python Debugger extension?

MJ1Peter commented 2 weeks ago

Here they are: debugger.vscode_7104fb7c-654b-446f-8779-cbe3380fe5e5.log debugpy.adapter-25538.log