bbCincinnati
Programmer
PROBLEM: System.Diagnostics.Debug.WriteLine() doesn't display in the Output box.
SOLUTION: Close Visual Studio, and then re-open it.
ENVIRONMENT: Visual Studio 2005 / C#
DETAILS:
Hi Folks,
Earlier today, I could not seem to get the results of a line of code to display anywhere.
System.Diagnostics.Debug.WriteLine( "bla bla bla");
I tried:
View | Output
...and...
Debug | Windows | Output
Didn't work. (The Output box displayed, but my line of code did not cause anything to print therein).
In fact when I put a breakpoints on the line of code and "ran" it, the breakpoint either disappeared or moved to the line below. It was as though my line of code was not being seen. I "googled" the problem and saw that many people also had the same issue, but I didn't see any solution. What finally worked was to shut down Visual Studio, and re-open it. (Not just stop debugging and re-run). It seems kind of obvious now, but I wasted probably an hour monkeying with it.
I hope this helps someone in the future )
SOLUTION: Close Visual Studio, and then re-open it.
ENVIRONMENT: Visual Studio 2005 / C#
DETAILS:
Hi Folks,
Earlier today, I could not seem to get the results of a line of code to display anywhere.
System.Diagnostics.Debug.WriteLine( "bla bla bla");
I tried:
View | Output
...and...
Debug | Windows | Output
Didn't work. (The Output box displayed, but my line of code did not cause anything to print therein).
In fact when I put a breakpoints on the line of code and "ran" it, the breakpoint either disappeared or moved to the line below. It was as though my line of code was not being seen. I "googled" the problem and saw that many people also had the same issue, but I didn't see any solution. What finally worked was to shut down Visual Studio, and re-open it. (Not just stop debugging and re-run). It seems kind of obvious now, but I wasted probably an hour monkeying with it.
I hope this helps someone in the future )