moved debugging onto threader