Adding hooks to enable debugger when running QThreads.