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

  1.  
  2. <!-- #include virtual="/quickstart/howto/include/header.inc" -->
  3.  
  4. <h4>How Do I...Instrument a small application 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 instrumenting your
  17. applications with tracing. Run it and take a look at the source code.
  18. You will see how easy it is to add simple instrumentation 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.  
  33. </font></div>
  34.  
  35. <h4>Example</h4>
  36.  
  37. <p>
  38. <div class="indent">
  39. <a target="_blank" href="/quickstart/howto/samples/Services/Tracing/TraceDemo">
  40. <img style="border-color:black" border=1 src="/quickstart/images/genicon.gif"><br>
  41. </a>
  42. <div class="caption">TraceDemo.exe</div><br>
  43. [<a target="_blank" href="/quickstart/howto/samples/Services/Tracing/TraceDemo">View Sample</a>] | 
  44. [<a target="_blank" href="/quickstart/util/srcview.aspx?path=/quickstart/howto/samples/Services/Tracing/TraceDemo/TraceDemo.src">View Source</a>]<p>
  45. </div>
  46.  
  47. <h4>Source Code</h4>
  48.  
  49. <div class="code">
  50. <xmp>
  51. <!-- #include virtual="/quickstart/howto/samples/Services/Tracing/TraceDemo/TraceDemo.cs" -->
  52. </xmp>
  53. </div>
  54.  
  55. <!-- #include virtual="/quickstart/howto/include/footer.inc" -->