move debug process to separate thread