Multiprocessing child processes stall during VSCode debugpy breakpoints
@heejaechang 已经在做这个了。
开始于 2025年5月14日。
评估
这个 Issue 还没有评估数据。
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/debugpy 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
documentation
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 3/5 1-2 天 新手友好度 68/100
查看 microsoft/debugpy 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 80/100
learningequality/kolibri#15351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Name consistency 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eellak/triplestore#65 · 1 条评论 ·