6

Is there a way in .NET (VB.NET or C#), when an exception happens, to dump the stacktrace of each thread? Basically I would like to reproduce what happens in Visual Studio's Debug->Threads window to see what each thread was doing when the exception happened

Denis
  • 11,796
  • 16
  • 88
  • 150
  • Similar questions have been asked previously on StackOverflow (as seen [here](https://stackoverflow.com/questions/466799/how-can-i-enumerate-all-managed-threads-in-c) and [here](https://stackoverflow.com/questions/2057781/is-there-a-way-to-get-the-stacktraces-for-all-threads-in-c-like-java-lang-threa)) and other forums. Those earlier discussions focused getting a list of all running threads, but if you had that information, getting a stack trace for each would be trivial. The consistent conclusion has been that there is not a way to do this in .NET, and that you would need to look to an extern – Andrew Brown Mar 15 '11 at 03:56

0 Answers0