I just ran into this problem myself when debugging some python code in WSL. The problem ended up being I was importing matplotlib without starting xlaunch. For reference I had pyqt5 installed with matplotlib in my wsl virtual environment. Even though I wasn't creating any plots I needed to either not import matplotlib or start xlaunch for the debugger to run at normal speed.