Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Collecting IntelliTrace Information

Caution noteCaution

Note: In Visual Studio 2010 Ultimate Service Pack 1, IntelliTrace no longer saves IntelliTrace log files (.iTrace files) by default after you close. For information about saving Intellitrace log files, see Saving Log Files in this topic.

This topic applies to Visual Studio 2010 Ultimate only.

IntelliTrace is enabled by default in Visual Studio 2010 Ultimate. During a live debugging session, IntelliTrace operates in the background, collecting IntelliTrace information automatically and invisibly. The availability of this information enables you to switch from the live debugging session to debugging with IntelliTrace and "time travel" through your code.

By default, IntelliTrace collects and logs information for selected IntelliTrace events only. The default collection settings have minimal overhead. They do not affect the running of your application or your ability to use the Visual Studio debugger.

Collecting calls and parameters enables IntelliTrace to provide additional debugging capabilities. However, collecting calls and parameters will increase performance overhead, use additional disk space, and disable the Edit and Continue feature of the Visual Studio debugger. You have to weigh the costs and benefits for your particular application and debugging scenario.

Collection options are set at the Visual Studio level. They apply to all Visual Basic and C# projects and solutions. Collection options persist between debug sessions and Visual Studio sessions.

By default, IntelliTrace does not saves IntelliTrace log files (.iTrace files) after you close Visual Studio. You can change the default behavior to enable IntelliTrace to save all log files, or you can manually save IntelliTrace log files, as described in the following procedures.

To change the default IntelliTrace log file behavior

  1. On the Tools menu, click Options.

  2. In the list of option categories, expand the IntelliTrace node and click Advanced.

  3. Perform one of the following tasks:

    1. If you want to save all IntelliTrace log files (.iTrace files), select Store IntelliTrace recordings in this directory and then specify the path to the folder in which you want the files to be saved.

    2. If you want .iTrace files to be deleted when you close Visual Studio unless you manually save them, clear Store IntelliTrace recordings in this directory.

  4. Click OK to save your changes.

To manually save an IntelliTrace log file

  1. Click the Save the current IntelliTrace session button on the toolbar in the IntelliTrace window.

  2. In the Save As dialog box, specify the file name to which you want to save the session and then click Save.

IntelliTrace events are events that occur while your application runs, which can be collected by IntelliTrace. Types of events that can be collected by IntelliTrace are as follows:

  • Debugger events. These are events that occur within the Visual Studio Debugger while you debug your application. The startup of your application is one debugger event. Other debugger events are stopping events, which are events that cause your application to enter a break state. Hitting a breakpoint, hitting a tracepoint, or executing a Step command are examples of stopping events.

    For performance reasons, IntelliTrace does not collect all possible values for every debugger event. Instead, IntelliTrace collects values that are visible to the user. If the Autos window is open, for example, IntelliTrace collects values that are visible in the Autos window. If the Autos window is closed, those values are not collected.

    If you point to a variable in a source window, the value that appears in the DataTip is collected. Values in a pinned DataTip are not collected, however.

  • Exception events. These occur for handled exceptions, at the points where the exception is thrown and caught, and for unhandled exceptions. IntelliTrace collects the type of exception and the exception message.

  • Framework Events. These occur within the .NET library. You can view a complete list of .NET events that can be collected on the IntelliTrace Events page of the Options dialog box. The data collected by IntelliTrace varies by event. For a File Access event, IntelliTrace collects the name of the file; for a Check Checkbox, it collects the checkbox state and text; and so on.

To see a list of IntelliTrace events that have been collected, click the IntelliTrace Events tab of the IntelliTrace window. Debugger events are always collected when IntelliTrace is enabled. You cannot turn off their collection.

Most common .Framework events are collected by default. You can use the following procedure to select other .NET events. Additionally, you can disable the collection of any or all .NET events. To decrease clutter in the IntelliTrace window, you might want to disable collection of events that do not interest you. Enabling or disabling the collecting of specific events generally has little effect on application performance.

To choose which IntelliTrace events you want to record

  1. On the IntelliTrace window toolbar, click the Open IntelliTrace Settings icon.

    –or–

    1. On the Tools menu, click Options.

    2. In the Options dialog box, point to the IntelliTrace node and then click General.

  2. Verify that Enable IntelliTrace is selected.

    NoteNote

    Clearing the Enable IntelliTrace check box disables all custom settings.

  3. Under the IntelliTrace node, click IntelliTrace Events.

  4. Look in the IntelliTrace Events box to find categories of events that you are interested in.

    1. To see individual events, click the tree control next to the Category name. For example, you can expand Registry to see specific registry events such as ClosedRegistryKey.

    2. To enable or disable recording of a whole category of events, select or clear the check box next to the category name.

    3. To enable or disable recording of a specific event, select or clear the check box next to the specific event name.

  5. Click OK.

  6. If you are debugging, you must restart the debugging session for changes to take effect.

If you need more information during debugging with IntelliTrace, you can choose to collect information about calls and their parameters. Collecting call information can have performance implications for your application and can increase the size of your log files.

Collecting call information is incompatible with the Edit and Continue feature of the Visual Studio debugger. If you choose to collect call information, Edit and Continue is automatically disabled and cannot be re-enabled while collection of call information is enabled.

When you enable IntelliTrace Events and Call Information, IntelliTrace collects a record of each call entry and exit. On entry, IntelliTrace collects name and value information for each parameter. For arrays, only the first 256 objects are recorded. For objects, only the top level of the structure is recorded. On exit, IntelliTrace collects the return value of the method.

To enable collection of call information

  1. In the Options dialog box, under the IntelliTrace node, click General.

  2. On the General page, click IntelliTrace Events and Call Information.

  3. Click OK.

You can turn collection of IntelliTrace information on or off for specific modules. This ability is useful because certain modules might not be interesting for debugging purposes. For example, you might be debugging a solution that includes legacy DLL projects that are well tested and thoroughly debugged. Excluding modules that do not interest you reduces clutter in the IntelliTrace window and makes it easier to concentrate on interesting code. It can also improve performance and reduce the disk space that is used by the log file. The difference can be significant if you have chosen to collect calls and parameters.

To collect data from selected modules

  1. In the Options dialog box, under the IntelliTrace node, click Modules.

  2. Select Collect data from all modules except for the following or Collect data from only the following modules.

    Underneath that setting is a list of module names.

  3. To remove a module from the list, select the module name and click the Remove button.

  4. To add a module to the list:

    1. Click the Add button.

      The Add a pattern dialog box appears.

    2. In the Enter a string pattern to match box, type the name of the module that you want to add to the list. You can use wildcard character specifiers at the beginning or end of the string to add more than one module.

    3. Click Add.

    Module names must be file names, not assembly names. File paths are not accepted.

  5. Click OK.

    NoteNote

    If collection is set to Events only on the General page, modules settings have no effect.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2015 Microsoft