Debugging Code Faster with IntelliTrace
This topic applies to Visual Studio 2010 Ultimate only.
Debugging is traditionally an iterative process. This frequently requires restarting an application several times in order to find the problem. By providing access to information about events that occurred in the past, IntelliTrace can eliminate many of those restarts, making debugging faster.
Here are some examples of how IntelliTrace can save you time:
You set a breakpoint near the start of your application. After observing the state of your application at that point, you continue execution. Later, you decide you want to go back and look at the first breakpoint hit again. Without IntelliTrace, you would have to restart your application. By using IntelliTrace, you can find the breakpoint event in the IntelliTrace window, and then click the breakpoint to view the state of your application at the time that the breakpoint was hit. State information includes variables that you have examined previously through DataTips or variable windows.
You discover that your application has corrupted a data file or a registry entry, but you do not know where the file or registry corruption has occurred. Without IntelliTrace, you would have to look through your code to find all possible file or registry accesses, place breakpoints on those accesses, then rerun your application to find where the problem occurs. By using IntelliTrace, you can see all registry- or file-access events that have been collected and the state of your application at the time each event occurred.
An exception occurs. Without IntelliTrace, you receive an exception message that states the nature of the exception but you have limited information on events that led up to the exception. You can examine the call stack to see the chain of calls that led up to the exception but you cannot examine the sequence of events that occurred during those calls. By using IntelliTrace, you can examine events that occurred at multiple times prior to the exception.
Debugging with IntelliTrace extends and enhances the typical Visual Studio debugging experience, without disruption to your usual workflow. If you use the default settings, IntelliTrace has minimal effect on application performance. You can choose to collect additional information beyond the default events.
To debug an application with IntelliTrace
Start Visual Studio debugging as usual.
On the Debug menu, click Start Debugging.
Use Visual Studio debugger windows, set breakpoints, and perform other debugging steps as usual.
Enter break mode automatically when your application hits a breakpoint or when you click Break All in the Debug menu or the IntelliTrace window.
Use the IntelliTrace window when you need more information about past events.
In the IntelliTrace events list, click an event that you want to view, as shown in the following illustration.
To filter the events list by thread or category, use the two drop-down lists at the top of the window.
To search for events that contain a specific string, type the string in the Search box, then click the magnifying glass icon.
Click a Related views link to see related information in a debugger window.
If the IntelliTrace event is a file-access event, you can click the pathname link to open the file. If the full pathname is not available, a search box appears. Use the search box to find the file.
By default, IntelliTrace collects information about specified IntelliTrace events that occur during your application run, including exceptions, debugger events such as hitting breakpoints, and .NET Framework events.
For even more debugging power, you can choose to collect IntelliTrace information on each call, including the call parameters and return value. If you choose to collect call information, IntelliTrace provides additional tools, including the Calls View. For information about how to use the Calls View, see IntelliTrace with Call Information.
For details about what information you can collect and how to collect it, see Collecting IntelliTrace Information.
For information about all IntelliTrace navigation tools, see Navigating with IntelliTrace.