Attach to PID of application embedding Python not working in VS Code on Windows
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python, vscode
- Domain
- devtools, operating-systems
Research direction
Start by reproducing the PID attach flow on Windows 11 with debugpy 1.8.1 and the launch.json configuration shown in the issue. Review VSCodeLog.txt and the attach entry point to determine why the debug server connection times out; done means embedded Python execution pauses at VS Code breakpoints after attaching.
Written by the indexing model from the issue text.
Description
Environment data
- debugpy version: 1.8.1
- OS and version: Windows 11 Enterprise 22H2
- Python version (& distribution if applicable, e.g. Anaconda): 3.10
- Using VS Code or Visual Studio: Visual Studio Code v1.52.1
Context:
I have embedded Python in my application (InProcess, running and loading relevant Python libraries in the same PID as that of my application) and am attempting to attach to this PID of my application from VSCode. The code to debug is to be invoked from my application. I want to be able to attach to my application’s PID using VSCode, ensuring that code executions triggered by my application will pause at breakpoints set in VSCode.
Actual behavior
Attaching to PID times out and a message. "Timed out waiting for debug server to connect" prompts up.
I am using the following launch.json to attach to the PID:
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to MATLAB",
"type": "debugpy",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}
Error log:
VSCodeLog.txt
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 202
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/debugpy
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
All issues in microsoft/debugpy
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
huggingface/Repo2RLEnv#163 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NousResearch/hermes-agent#121143 ·