Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Attach to PID of application embedding Python not working in VS Code on Windows

Open
#1,584 1 comment 0 reactions 0 assignees View on GitHub

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

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

bug

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/debugpy

All issues in microsoft/debugpy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.