I am currently developing a PyQt application in Visual Studio. Debugging works fine until I decided that my user interface is responsive by moving stuff to a workflow with Qt threads.
class MainWindow(base, form):
start_work = QtCore.pyqtSignal()
def __init__(self, parent=None):
self.thread = QtCore.QThread()
self.worker = Worker()
self.worker.moveToThread(self.thread)
self.start_work.connect(self.worker.get_work_done)
self.thread.start()
def do_work(self):
self.startWork.emit()
Any function called on my work object connects through signal slots
class Worker(QtCore.QObject):
@QtCore.pyqtSlot()
def get_work_done(self):
The code is working fine. The only problem now, I canβt debug everything that happens inside get_work_done. The visual studio will not break at these control points.
When I open any function MainWindow, Visual Studio Debugger shows only one thread. It does not seem to be aware of any other threads created by the application.