Program has three threads, the main thread, ThreadA, ThreadB, debugging code in the main thread is allowed, but in the ThreadA ThreadB set breakpoint is invalid, just enter the GDB will crash, as shown in figure The following code is to create a thread PClassA=new ClassA; PClassB=new ClassB; PThreadA=new QThread (); PThreadB=new QThread (); PClassA - & gt; MoveToThread (pThreadA); PClassB - & gt; MoveToThread (pThreadB);