Re: Debug.Print Release ?
- From: "Jay B. Harlow [MVP - Outlook]" <Jay_Harlow_MVP@xxxxxxxxxxxxx>
- Date: Wed, 4 Jan 2006 12:11:26 -0600
Bill,
Rather then attempt to expose the Debug object for Release builds, I would
recommend you use Trace.Print instead. As the Trace object is normally
enabled in Release builds, while Debug is only enabled in Debug builds.
If you really want the Debug object in Release Builds you can use "Project -
Properties - Compile - Advanced Compile Options - Define DEBUG constant" to
define the DEBUG compile time constant.
NOTE: "Define DEBUG constant" will enable all conditional code that uses the
Debug constant. Whether this code is using #if Debug or
<Conditional("Debug")>
FWIW: The System.Diagnostics.Debug (Debug.Print) has a
<Conditional("Debug")> attribute on it, you can apply the same attribute to
your code to achieve the same effect...
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net
<swartzbill2000@xxxxxxxxx> wrote in message
news:1136397022.252378.301120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
| Hello,
| I have a VB 2005 Express project with a TraceListener-derived class to
| route Debug.Print output to a log file. It works fine for Debug builds.
| What is the correct combination of changes to make it work in Release
| build?
| Bill
|
.
- Follow-Ups:
- Re: Debug.Print Release ?
- From: swartzbill2000
- Re: Debug.Print Release ?
- References:
- Debug.Print Release ?
- From: swartzbill2000
- Debug.Print Release ?
- Prev by Date: Before delete event - where is it?
- Next by Date: VS2005 - Debug and Locked Files
- Previous by thread: Debug.Print Release ?
- Next by thread: Re: Debug.Print Release ?
- Index(es):
Relevant Pages
|
Loading