What to do about debugging in a multi-threaded application?