-
Notifications
You must be signed in to change notification settings - Fork 137
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: "Timed out waiting for launcher to connect" #1677
Comments
I would also add that this runs no problem on Linux. |
Thanks for your bug report, could you send me the logs of the Python Debugger extension? |
Sorry for the delay in responding and thanks for the information, I will try to reproduce the bug. |
Following back up on this, any update? |
Thanks for reporting the bug, and sorry for the delay. I tried it on a Mac and it's working for me. Can you try again with the latest version of the Python Debugger extension and the latest version of VSCode? If the error persists, can you send me the Python Debugger output logs? |
Hey @karthiknadig, this issue might need further attention. @MJ1Peter, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
I’m encountering a timeout issue when debugging Python tests in VSCode after updating to the latest version. My launch.json was working perfectly until a couple of days ago, but now it’s failing with the same timeout error. Here’s the launch.json configuration I’m 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": "Jira_id",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/_test/acceptance/src/",
"module": "behave",
"env": {
"PYTHONPATH": "${workspaceFolder}/_test/acceptance/src"
},
"console": "integratedTerminal",
"args": [
"${file}",
"-t",
"@jira.${selectedText}",
"--no-skipped",
"-D",
"TestExecution_environment=local_es"
],
"stopOnEntry": false,
"justMyCode": false,
"logToFile": true
}
]
} The logs after attempting to execute are as follows: When running the following commands manually in the terminal, everything works fine: behave /Users/cx02460/Documents/Development/wallet-core/_test/acceptance/src/features/api/0-component/01-transactions_api/014-operations_b2m/tasks/process_inactive_accounts_kyc/success.feature -t @jira.QAWLLT-2044 --no-skipped -D TestExecution_environment=local_es
python -m debugpy --listen 5678 -m behave /Users/cx02460/Documents/Development/wallet-core/_test/acceptance/src/features/api/0-component/01-transactions_api/014-operations_b2m/tasks/process_inactive_accounts_kyc/success.feature -t @jira.QAWLLT-2044 --no-skipped -D TestExecution_environment=local_es However, when pointing to the debugpy launcher file, I get the following error:
I am completely stuck and unsure of the next steps to resolve this issue. Any assistance would be greatly appreciated. |
Im also having the same timeout issue, not sure how to fix this |
A temporary fix can be a change in a launch.json: |
working for me |
working for me too. Thanks! |
Hey, I'm having the same issue |
Thank you for your suggestion. I was able to get it working by setting "console": "internalConsole". This prevents the timeout error and opens the debug console, which is definitely an improvement. However, when I set breakpoints, the debugger only stops at some of them, and not others. It's better than not being able to launch at all, but it’s still not a complete solution. I hope this can be resolved fully. Thanks again for your help! |
@ErideDLF, I'm encountering the same error. Everything worked fine until two weeks ago, but now it only works when setting "console": "internalConsole." I hope it gets fixed soon. |
Also suddenly started having this issue about a week ago...
I agree with this, and I also would really hope for a fix soon too. |
Any updates? |
Same issue for me changing to internalConsole works. |
Any updates ? |
related? #1681 |
Same issue for me, works with |
The issue is that the command is passed too early, before the terminal starts up, as mentioned in #1681. As a work around, to make debugging work even with |
This seems like a vscode extension issue, not a debugpy issue. Debugpy doesn't pass the command to the terminal. |
@karthiknadig I think this would be a problem with the extension (or maybe VS code) running the command before the terminal starts up. |
@rchiodo This is still with There are 4 process involved. Sequence:
I believe the issue occurs at 6. I am guessing something is going on with how the port is setting up. The reason we need P3 and we don't directly launch P4 is to handle OS exit in Python. Typically, when python process exits we use Here is the code in P1 that starts P2: |
Any updates? |
We have yet to reproduce the problem. I still think it's some issue with VS code as debugpy doesn't change very often. You might try an older VS code and see if the problem goes away. That would be step 5 above. The 'run-in-terminal' message isn't starting the P3 process. |
It's finally fixed😄 1.94.0
d78a74bcdfad14d5d3b1b782f87255d802b57511
arm64 |
Solved. I am using version 1.94.0 on Windows. Right-click on Code.exe and select "Properties" from the context menu. |
Closing giving that two people upgrading VS code solved the issue. |
I still have the same issue on Mac, even with latest version... |
Did you use conda? |
For what? But no, I've never used conda |
Because I found that when I disabled automatic activation of virtual environments, the problem disappeared and vscode automatically entered the command to activate virtual environments before the terminal launched successfully, causing debugpy to fail to launch. cc @rchiodo |
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
From terminal
However, when I try to debug it from VSCode I get the following:
This is the config for launch.json im using:
`{
}`
The text was updated successfully, but these errors were encountered: