got the debugger to reliably work in all cases, finally, and it no longer uses onethread, but proper torch