4.5.11.1. 解决Python+vscode环境下QThread线程无法加入断点的问题

需要安裝debugpy

pip install  debugpy
debugpy.debug_this_thread()
# 解决 QThread 线程无法加入断点问题.

from PyQt5.QtCore import *
import ptvsd

class MyTestThrad(QThread):
    def run(self):
        debugpy.debug_this_thread()  # 2 调用 debug_this_thread
        print('xx')