   [.net] Different debugging methods
  I was curious about different debugging methods, and by debugging i don't mean stepping through your code. I was more interrested in what built-in features there are in .net and vs that allows me to print out debug messages in different ways without having to create a class of my own for debugging.[Edited by - Cybrosys on June 14, 2006 8:49:22 AM]
  VS2005 actually added some support for exactly what you're describing.  However, it isn't in the Express edition for C# or VB.  It is in C++ express, if that's what you're using, as well as (I believe) Standard Edition and higher.These are called tracepoints.  To use them, you can right click on the red circle for a breakpoint you have set.  If you are using the appropriate version of VS, you'll get a context menu with several options.  These allow you to set things like hitcount (how many times the BP must be hit before breaking,) condition (some expression that must be true for the bp to be hit,) and an option called "When Hit..."  It's this last one that you want - it allows you to set a breakpoint that doesn't break, but rather outputs some text.If you don't have that version of VS, or you want to do it from your code rather than the IDE, take a look at the System.Diagnostics.Debug class.  System.Diagnostics.Debug.Write will output some text to the output window in Visual Studio (or whatever debug listener is registered.)Hope that helps.   ;  Tracepoints are heaven when you need to debug UI focus issues, like I have this past week.   