Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 16th, 2004, 01:14 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default Debug and Trace

Hello,

I'm reading about the difference between Debug and Trace classes in the System.Diagnostics namespace. For the Debug, it says the statements using Debug.<method> will be executed when the application is in Debug mode. Does that mean that when in Release mode, the statement's aren't called, or are they stripped from the code when compiled?

Thanks,

Brian Mains
__________________
Brian
 
Old March 16th, 2004, 01:21 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I can't provide a definitive answer on this, but it would make sense that the code isn't stripped out. I imagine it's just that the calls don't actually do anything. When you use Debug.<method> (line WriteLine) the result goes to the debugger output window.
 
Old March 17th, 2004, 01:49 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

yes somehow, u can try! u can not trace & put break-point in Release mode, it'll be useless!

Always:),
Hovik Melkomian.
 
Old March 17th, 2004, 09:28 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

That's not entirely true. You CAN trace in release compiled code. All trace calls within release compiled code will function. If the application (in web.config) allows tracing, you can go to "trace.axd" at the application root and see trace information for the last X page calls (X is determined/set in the trace node of web.config). Also, if the page itself has "trace=true" in the page directive, you should get the trace information on the page output. So tracing most certainly will work with release code.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Trace.write and Debug.write surendraparashar ASP.NET 2.0 Professional 1 June 27th, 2007 02:12 AM
Trace logoff error l.wolf Oracle 0 June 7th, 2007 05:10 AM
using Trace Tids ASP.NET 1.0 and 1.1 Basics 0 August 15th, 2004 02:20 PM
Collection as a Trace/Debug Listener? llyal2000 C# 2 June 10th, 2004 11:10 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.