home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples.exe / QuickStart / howto / doc / trace.aspx < prev    next >
Encoding:
Text File  |  2000-06-14  |  2.2 KB  |  54 lines

  1.  
  2. <!-- #include virtual="/quickstart/howto/include/header.inc" -->
  3.  
  4. <h4>How Do I... Work with tracing?</h4>
  5.  
  6. <div class="indent" style="width:660"><font face="Tahoma" size="1">
  7.  
  8. <p>Trace instrumentation allows developers and administrators
  9. to monitor the health of applications running in real-life settings (as opposed to
  10. running in a debugger). Sometimes using a debugger can hide bugs and
  11. obscure some performance and threading problems. Tracing is a very important
  12. monitoring and debugging tool for distributed, multi-tier applications. Such
  13. applications often contain problems that can only be observed when the application is
  14. under a heavy load and the inherent randomness of a real-life environment.</p>
  15.  
  16. <p>This sample illustrates the basics of using the Trace and
  17. Debug classes. Run it and take a look at the source code. You will see
  18. how easy it is to add simple tracing to your applications.</p>
  19.  
  20. <p>You have to compile your instrumented applications with
  21. TRACE or DEBUG compiler directives enabled. Otherwise all calls to Trace or
  22. Debug (respectively) are ignored during compilation.</p>
  23.  
  24. <p>Before running the application, open a command line window
  25. and run DbMon.exe. You will be able to see any Debug and Trace messages coming
  26. from any application running on your system.</p>
  27.  
  28. <p>
  29. <b>Note: </b> The Debug Monitor utility (DBMon.exe) is available from the Windows Platform SDK on the <a target="_blank" href="http://msdn.microsoft.com">Microsoft Developer Network</a> website.
  30. </p>
  31.  
  32. </font></div>
  33.  
  34. <h4>Example</h4>
  35.  
  36. <p>
  37. <div class="indent">
  38. <a target="_blank" href="/quickstart/howto/samples/Services/Tracing/Trace/trace.exe">
  39. <img style="border-color:black" border=1 src="/quickstart/images/genicon.gif"><br>
  40. </a>
  41. <div class="caption">Trace.exe</div><br>
  42. [<a target="_blank" href="/quickstart/howto/samples/Services/Tracing/Trace">View Sample</a>] | 
  43. [<a target="_blank" href="/quickstart/util/srcview.aspx?path=/quickstart/howto/samples/Services/Tracing/Trace/Trace.src">View Source</a>]<p>
  44. </div>
  45.  
  46. <h4>Source Code</h4>
  47.  
  48. <div class="code">
  49. <xmp>
  50. <!-- #include virtual="/quickstart/howto/samples/Services/Tracing/Trace/Trace.cs" -->
  51. </xmp>
  52. </div>
  53.  
  54. <!-- #include virtual="/quickstart/howto/include/footer.inc" -->