Поделиться через


Configure IntelliTrace to collect debugging information

You can control how much information you see while debugging with IntelliTrace in Visual Studio Ultimate when you change the IntelliTrace collection settings. These settings apply to all projects and solutions, and they persist between debugging sessions and Visual Studio sessions.

  • Configure event collection

  • Configure function call collection

  • Configure module collection

Configure event collection

You can turn on or turn off collection of specific IntelliTrace events, except for debugger events and exceptions, which are always collected. IntelliTrace events are debugger events, exceptions, .NET Framework events, and other system events that can help you with debugging. See Debug your app by recording code execution with IntelliTrace.

  1. In Visual Studio Ultimate, confirm that IntelliTrace is turned on.

    Enable or disable IntelliTrace in Visual Studio

    Note

    Clearing Enable IntelliTrace turns off all custom settings.

  2. Choose the events and event categories that you want to collect.

    Configure IntelliTrace event collection

  3. If necessary, restart your debugging session. To start debugging with IntelliTrace, see Record code execution with IntelliTrace while debugging.

What data does IntelliTrace collect for IntelliTrace events?

  • Debugger events

    To help with performance, IntelliTrace doesn't record every possible value for a debugger event. Instead, it records these values:

    • Values in the Locals window. Keep the Locals window open to see these values.

    • Values in the Autos window only if the Autos window is open

    • Values in DataTips that appear when you move the mouse pointer on top of a variable in the source window to see its value. IntelliTrace doesn't collect values in pinned DataTips.

  • Exceptions

    IntelliTrace records the exception type and message for these kinds of exceptions:

    • Handled exceptions where the exception is thrown and caught

    • Unhandled exceptions

  • .NET Framework events

    By default, IntelliTrace records the most common .NET Framework events. For example:

    • For a File Access event, IntelliTrace collects the file name.

    • For a Check Checkbox event, IntelliTrace collects the checkbox state and text.

Configure function call collection

When call collection is turned on, you can switch from traditional debugging to IntelliTrace debugging so you can step through code and see the call stack history. To enable this, turn on call collection before starting your debugging session. See Debug your app by recording code execution with IntelliTrace.

  1. In Visual Studio Ultimate, turn on or turn off IntelliTrace events and call information.

    Configure call collection for IntelliTrace

  2. Restart your debugging session, if necessary. To start debugging with IntelliTrace, see Record code execution with IntelliTrace while debugging.

Note

Turning on call collection might slow down your app significantly. It might also increase the size of any IntelliTrace log files (.iTrace files) that you're saving to disk. To minimize these effects, collect call information only for the modules you care about. To change the maximum size of your .iTrace files, go to Tools, Options, IntelliTrace, Advanced.

What data does IntelliTrace collect for function calls?

For each function call, IntelliTrace records this data:

  • Function name

  • Values of primitive data types passed as parameters at function entry points and returned at function exit points

  • Values of automatic properties when they are read or changed

  • Pointers to first-level child objects, but not their values other than if they were null or not

Note

IntelliTrace collects only the first 256 objects in arrays and the first 256 characters for strings.

Configure module collection

To control how much call information that IntelliTrace collects, specify only those modules that you care about. This can help improve your app's performance during collection. To confirm that IntelliTrace is collecting call information, go to Tools, Options, IntelliTrace, General.

Tip

You can also exclude modules, but this can still result in collecting data from modules that might not interest you, such as third-party or open-source modules.

  1. In Visual Studio Ultimate, specify the modules to include or exclude for collection.

    To add multiple modules, use the wildcard character * at the start or the end of the string. For module names, use file names, not assembly names. File paths are not accepted.

    Configure module collection for IntelliTrace

  2. To start debugging with IntelliTrace, see Record code execution with IntelliTrace while debugging.

Where can I get more information?

Debug your app by recording code execution with IntelliTrace

Record code execution with IntelliTrace while debugging

Collect diagnostic data in production by using the IntelliTrace stand-alone collector

Blogs

Visual Studio ALM + Team Foundation Server

Forums

Visual Studio Debugger

Guidance

Testing for Continuous Delivery with Visual Studio 2012 – Chapter 6: A Testing Toolbox

Videos

Channel 9: Collecting and analyzing IntelliTrace data