newbie question about web.config, tracing

  • Thread starter Thread starter Jiho Han
  • Start date Start date
J

Jiho Han

I have a solution built with conditional #if(DEBUG) ... #endif, so that
statements like Context.Trace.Write("this is a trace statement."); are only
compiled into a debug build and not into a release one. So that works like
a charm. I built a debug and a release solution. In my dev environment,
things behave the way I want them to, debug build writes out to the trace so
I can view them via Trace.axd and the release doesn't.

The issue arises when I deploy the debug build to the testing environment.
The debug build no longer writes output to the trace. Tracing itself is
working because I see other Context.Trace.Write statements that are not
enclosed by #if(DEBUG)... #endif.
The ones that were enclosed, ones I'm interested in are not. I figure there
must be some kind of setting in web.config or machine.config somewhere, but
I can't seem to find it.

Can someone help?
Thanks.
 
Your post went unanswered. Have you resolved this issue? If you still need
help, please post the original question with your request.
 
No I did not resolve the issue. I would still like assistance but why the
need for a repost?

Thanks

Alvin Bruney said:
Your post went unanswered. Have you resolved this issue? If you still need
help, please post the original question with your request.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Jiho Han said:
I have a solution built with conditional #if(DEBUG) ... #endif, so that
statements like Context.Trace.Write("this is a trace statement."); are only
compiled into a debug build and not into a release one. So that works like
a charm. I built a debug and a release solution. In my dev environment,
things behave the way I want them to, debug build writes out to the
trace
so
I can view them via Trace.axd and the release doesn't.

The issue arises when I deploy the debug build to the testing environment.
The debug build no longer writes output to the trace. Tracing itself is
working because I see other Context.Trace.Write statements that are not
enclosed by #if(DEBUG)... #endif.
The ones that were enclosed, ones I'm interested in are not. I figure there
must be some kind of setting in web.config or machine.config somewhere, but
I can't seem to find it.

Can someone help?
Thanks.
 
The reason for the repost is that threads from devdex.com dont include the
original and i have no way to know what the original question was.

You do not need to use conditional macros. These don't find much use in
..net. Just turn tracing on. It's default is false. The turning on or off is
handled from the <trace> node of the webconfig file. This is better than
macros because you may turn the trace utility on or off without touching the
code. When tracing is turned off, the trace call returns immediately. This
is a slight performance hit but pales in comparison to the added ability it
brings in terms of debugging

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Jiho Han said:
No I did not resolve the issue. I would still like assistance but why the
need for a repost?

Thanks

Alvin Bruney said:
Your post went unanswered. Have you resolved this issue? If you still need
help, please post the original question with your request.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
Jiho Han said:
I have a solution built with conditional #if(DEBUG) ... #endif, so that
statements like Context.Trace.Write("this is a trace statement."); are only
compiled into a debug build and not into a release one. So that works like
a charm. I built a debug and a release solution. In my dev environment,
things behave the way I want them to, debug build writes out to the
trace
so
I can view them via Trace.axd and the release doesn't.

The issue arises when I deploy the debug build to the testing environment.
The debug build no longer writes output to the trace. Tracing itself is
working because I see other Context.Trace.Write statements that are not
enclosed by #if(DEBUG)... #endif.
The ones that were enclosed, ones I'm interested in are not. I figure there
must be some kind of setting in web.config or machine.config
somewhere,
but
I can't seem to find it.

Can someone help?
Thanks.
 
Back
Top