title: How to debug a multi-threaded program that only deadlocks as a standalone application
body: <p>I have a C++ program that uses 2 threads. The program runs fine in Debug and Release mode when run through Visual Studio. However, when run as a stand-alone application it always stalls. I tried to add in printf messages so that I could output the information to the screen, but that just fixed my problem. I take the messages back out and I'm back to the original problem again.</p>
  
  <p>Anyone have any wise words of wisdom to share for an issue like this?</p>