简体   繁体   中英

Pycharm community edition wont stop on breakpoints inside parallel code

I am trying to debug a multiprocessing function with PyCharm community edition. The debugger seems to stop in the forked process but i cant explore any variables in the debugger view. I only see this: 在此处输入图像描述 And in the console I see this outputs: 在此处输入图像描述

Seems like when a breakpoint is reached in a forked process this gets printed: Backend Qt5Agg is interactive backend. Turning interactive mode on. Backend Qt5Agg is interactive backend. Turning interactive mode on. Debugger for single threadded code works normaly as exected.

System Info:

PyCharm 2020.2.5 (Community Edition)
Build #PC-202.8194.22, built on December 1, 2020
Runtime version: 11.0.9+11-b944.49 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.10.2-2-manjaro
Current Desktop: i3

Minimal code that reproducess the problem:

def func(x):
    # Breakpoint here
    return x*x

a = [1,2,3,4]
p = multiprocessing.Pool(5)
p.map(func,a)

This issue got resolved with the latest PyCharm update and pacman -Syu

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM