📜 ⬆️ ⬇️

IntelliTrace or historical debugger in Visual Studio 2010

Probably one of the most intriguing innovations in Visual Studio 2010 is IntelliTrace or as it was previously presented by the historical debugger. And after the release of a new studio, you can add your own opinion about this possibility and its practical application or necessity - in short, to be brief, you need to decide - why we need it.

What is IntelliTrace? This is a new feature, and accordingly a new window when debugging, which combines the usual trace (output window in Visual Studio), the debugger and the call stack. Those. such a mix of existing windows and, accordingly, capabilities - output + callstack + debugger = IntelliTrace.

image
')
IntelliTrace is a window that appears when debugging or that can be shown from Debug> Windows. When it hits the code (breakpoint, the occurrence of expcetion, etc.) it shows all the events it records, including exceptions, actions with controls, database access and many others (you can view / enable / disable them). options Tools> Options> IntelliTrace> IntelliTrace events). The newest events are at the bottom of the list, and accordingly the oldest ones are at the top. The Live event is where we are now “in code” during execution.

By selecting a specific event, you can go to the place where the code originated, view the call stack, and even the values ​​of variables (if IntelliTrace events and call information is selected).

image

There are two modes of operation:
- Event only (events only)
- Events and call information (events and call information)

In the last mode, the variable values ​​are fixed at the event point. You can switch between them in the options as shown in the screenshot:

image

In the IntelliTrace events node you can also configure which events to react to.

So is IntelliTrace still needed? This is undoubtedly a rather comfortable addition to the existing debugging capabilities, which can greatly simplify debugging, such as calls to the UI event of controls, calls to the database, everything can be easily seen and passed to it in code. IntelliTrace can greatly simplify debugging or make it more comfortable.

image

Performance can be slightly improved using Event only mode and only occasionally switching to Events and call information, since it can be done quickly from the IntelliTrace window. You can also specify which modules to collect information from. The default option is to collect from all collector from all modules except following, except for Microsoft, it can be changed to “collect from only following modules”.

image

IntelliTrace is also used in the new test system - Microsoft Test And Lab Management. IntelliTrace are added to bugs and developers can later open them on their computer to reproduce the situation exactly. What makes working with such a bug much more convenient. And even if the source code on the developer's machine is different from the record - it is possible, if you correctly configure the “pdb server”, to debug the code of the version relevant to the bug.

To sum up on IntelliTrace. What we have?

Pros:
+ Debugging becomes more comfortable and more intuitive. It is easier now to intercept, for example, extra event calls from handlers, calls to the database, help, and so on, since the call stack, variable values ​​(in events and call information mode) are saved
+ Testing. Interaction tester and developer. It is now easier to debug bugs because we have additional information in our hands in the form of events, their stacks and variable values. Integration with the studio and Microsoft Test And Lab Management. You can fiddle iTrace files between developers, companies.

Minuses:
- Available only in the most expensive studio edition - Ultimate
- Performance. On simple applications, debugging starts quickly, on complex ones for a long time. Therefore, you probably have to work out a mode of operation when you mostly debug without IntelliTrace or in a lightweight mode events only and in exceptional cases turn on the heavyweight mode.
- Only for x86 applications
- I would like to have more events and the opportunity to expand them with my own.

IntelliTrace's main fad is just testing. This allows, in conjunction with Microsoft Test Manager and TFS, to create bugs and other work items in TFS with IntelliTrace data written to the iTrace file. This Microsoft tried to get rid of bugs that are "not reproduced." In this regard, no doubt everything turned out. Perhaps in the future, IntelliTrace will develop and get rid of some of its shortcomings. We will follow this.

Here is such an IntelliTrace. As far as advantages are comparable with disadvantages, everyone will decide on the basis of their own tasks and requirements. Developers will still have to develop a style of working with it, and everyone will decide whether to use it, weighing all the pros and cons.

Source: https://habr.com/ru/post/92441/


All Articles