Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Multiprocessing child processes stall during VSCode debugpy breakpoints

未关闭
#1,891 0 条评论 2 个 reaction 已指派 1 人 在 GitHub 查看

@heejaechang 已经在做这个了。

开始于 2025年5月14日。

评估

这个 Issue 还没有评估数据。

描述

bug needs repro

Environment data

  • debugpy version: 1.8.13
  • OS and version: Windows 11
  • Python version: 3.12+ (python standalone by uv)
  • Using VS Code or Visual Studio: VS Code 1.100.1 (Universal) on macOS tunneled to Windows with same version VS Code

Actual behavior

I have a running child process which draws some rectangles on screen. If I hit a breakpoint in my main process now I can't manually trigger rectangles drawing from the REPL. This isn't working with debugpy and python 3.12+ - it is working though with Python 3.11.12. Outside of VS Code with f.e. pdb.set_trace() it's working in all versions of Python I've tested.

Expected behavior

The child process keeps working and I can manually trigger things.

Steps to reproduce:

minimal example, tested with Python 3.13.3 on Windows and issue persists.

import multiprocessing
import time


def child_process(q):
    while True:
        msg = q.get()
        if msg == "STOP":
            print("Child received STOP command.")
            break
        print(f"Child received: {msg}")
        time.sleep(0.5)


if __name__ == "__main__":
    multiprocessing.freeze_support()

    queue = multiprocessing.Queue()

    child = multiprocessing.Process(target=child_process, args=(queue,))
    child.start()

    for i in range(3):
        queue.put(f"Message {i}")
        time.sleep(1)

    # Set a breakpoint on the next line in VSCode
    queue.put("Message at breakpoint")  # BREAKPOINT HERE
    # execute in REPL at breakpoint queue.put(f"Hello from REPL")
    
    # Try to continue communication after breakpoint
    queue.put("Final message")
    queue.put("STOP")

    child.join()
    print("Parent process complete.")

no launch.json in use, I've just hit the "Debug Python File" icon in VS Code.

主要语言
Python
星标
2.5k
派生
202
平均合并
5 天 1 小时
30 天内合并 PR
1

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/debugpy 的其他 Issue

查看 microsoft/debugpy 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。