ATLTraceTool Sample: Displays Output of ATLTRACE2
The ATLTraceTool sample builds an application that specifies which ATLTRACE2 messages appear in the output window. This application, the ATL Trace Tool, displays debug trace messages in the ATL and MFC sources. You can control the type and amount of messages displayed.
AtlTraceTool.exe ships in Visual Studio and can be found in the \Program Files\Microsoft Visual Studio 9.0\Common7\Tools directory. AtlTraceTool.exe is also available from the Tools menu in the development environment.
Security Note |
|---|
|
This sample code is intended to illustrate a concept, and it shows only the code that is relevant to that concept. It may not meet the security requirements for a specific environment, and it should not be used exactly as shown. We recommend that you add security and error-handling code to make your projects more secure and robust. Microsoft provides this sample code "AS IS" with no warranties. |
To get samples and instructions for installing them:
To access samples from Visual Studio
-
On the Help menu, click Samples.
By default, these samples are installed in drive:\Program Files\Microsoft Visual Studio 10.0\Samples\.
For the most recent version of this sample and a list of other samples, see Visual Studio Samples on the MSDN Web site.
To build and run this sample
Open the solution file tracetool.sln.
From the Build menu, click Build.
From the Debug menu, click Start Without Debugging.
Note |
|---|
This procedure is optional. You can use the prebuilt AtlTraceTool.exe instead if you want. |
To use ATLTraceTool.exe
Debug an MFC or ATL project by clicking Start from the Debug menu.
From the Tools menu, click MFC/ATL Trace Tool if it is not already running.
Expand the tree control list in the Trace List window. The window shows the running application, any modules within that application, and the trace categories for each module.
Customize, for each process, module, and category, which information is displayed in the output window. The Trace level control in the Process group is related to the ATLTRACE2 level; only those ATLTRACE2 messages with a level equal to or greater than the setting in the Trace level control will be displayed in the output window.
Click Apply to put your settings into effect.
You can save your settings and load them the next time you debug the application; use the Save and Load buttons.
Security Note