I'm trying to write some debug output to the output window using System.Diagnostics.Debug.WriteLine(). AFAIK, the only requirement to be able to use the System.Diagnostics class is to add the System namespace (which is there by default). I have one project where I can use the Debug class, as shown below:

But my current project doesn't show the debug class and I'm confused:

Suggestions?
EDIT: This was the problem - I initially added my external class file as a 'Solution Item' and it placed it to the top of the solution in a folder. When the program didn't compile because my reference on Form1 to the namespace failed, I simply dragged the class file from the solution folder to the program folder (for lack of a better description). It was this duplication and versioning mismatch that was my problem. As soon as I removed the reference to the 'Solution Item', my breakpoints were working again and the System.Diagnostics.Debug class was available in my class file.

The Debug class is supported in all profiles and version of the .Net framework. The most likely cause of this not showing up in Intellisense are ...
Debug livesThe most likely cause is #1. Can you make sure you have the appropriate reference?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With