views:

113

answers:

3

I'm using Visual Studio 2008. The Trace output is no longer being shown in the Immediate Window any of my forms except the primary form. When it executes code from within another form (called from that primary form) the Trace output doesn't show up. It used to be fine, and one day it just stopped working. I think this is a setting in VS2008. Anyone have any idea what setting this would be under?

It's got a TraceListener in the code, and that hasn't been touched.

+1  A: 

Can you do a quick check and see if the second project is compiling in Release or Debug? If it's Release there's a chance Trace won't be defined and Trace output hence won't show up.

JaredPar
This was it. One project was set to Release, the other to Debug.Thank you SO much for the help!
calico-cat
A: 

Check that you're referencing System.Diagnostics.Trace, and not the Page.Trace TraceContext object. If you're just doing Trace.Write it might be resolving to the wrong place, depending on your using directives.

cxfx
It was System.Diagnostics.Trace. Thanks for the idea though :)
calico-cat
Definitely learnt that one the hard way... :)
cxfx
A: 

There's an item under Options - Debugging - General: "Redirect all Output Window text to the Immediate Window". That should do the trick.

Patrick

PatSim
it was appearing in neither window. Thanks for your answer though! :)
calico-cat