title: How to detect and debug multi-threading problems?
body: <p>This is a follow up to <a href="https://stackoverflow.com/questions/493311/how-to-write-safe-correct-multi-threaded-code-in-net">this question</a>, where I didn't get any input on this point. Here is the brief question:</p>
  
  <p><strong>Is it possible to detect and debug problems coming from multi-threaded code?</strong></p>
  
  <p>Often we have to tell our customers: "We can't reproduce the problem here, so we can't fix it. Please tell us the steps to reproduce the problem, then we'll fix it." It's a somehow nasty answer if I know that it is a multi-threading problem, but mostly I don't. How do I get to know that a problem is a multi-threading issue and how to debug it?</p>
  
  <p>I'd like to know if there are any special logging frameworks, or debugging techniques, or code inspectors, or anything else to help solving such issues. General approaches are welcome. If any answer should be language related then keep it to .NET and Java.</p>