Debugging tip

Troubleshooting multi-threaded applications has always been fun. And by fun I mean pulling your hair out kind of fun. The troubleshooting can be especially challenging when the bug involves threading errors. Errors such as race conditions and dead locks can be hard to track down.

One useful thing that I've found is the Debug class in the System.Diagnostics namespace. The Write() method on the Debug class allows you to write debug output to either the output window in Visual Studio or a flat file. The debug output can help to track down where the threading errors are occuring.
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted @ Monday, December 22, 2008 1:25 PM
Print

Comments on this entry:

# re: Debugging tip

Left by wtfChris at 12/22/2008 6:16 PM
Gravatar
Also take a look at the Trace class, its similar to debug and can execute in either DEBUG or RELEASE mode.

Your comment:



(not displayed)


 
 
 
 
 

Live Comment Preview:

 
«February»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910