I am sure by this time all of you already aware of what is IntelliTrace Debugging. Just to give a quick overview, IntelliTrace is a new features of Visual Studio 2010 Ultimate Edition. By default IntelliTrace is enabled . During debugging in Visual Studio, IntelliTrace works in the background and collect debugging information automatically and stored them in IntelliTrace Log File (. iTrace File ) . You can use the log file at any point of time to see what happened exactly at background during your live debugging. To know more details, you can see my several articles published on IntelliTrace and for step by step guide read “Debugging Application using IntelliTrace” from MSDN .
Using IntelliTrace you can capture module specific information. This is really helpful when you don’t want to debug certain modules during your debugging process. In this post I am going to discuss about how you can collect module specific information using IntelliTrace.
As I said, you can turn on or off module specific debugging collection using IntelliTrace. IntelliTrace settings allows you to specifically mention module names for which you want to capture debugging information or from which you don’t want. This is really useful because certain modules you might not be interesting for debugging purposes ( for example, you have some code previously which is working fine and you don’t want to test it ) .
How does it help ?
- By avoiding unnecessary module you can only focus on the code on which you are interested to debugging.
- It can improve the performance of debugging and loading debug information.
- It will reduce the (.itrace ) log file size.
So, let have a look how things works. First you have to check the IntelliTrace Settings from Tools > Options > Intellitrace window. Select “Module” in IntelliTrace settings window.
In Module settings window you will find two option button
- Collect data from all modules except for the following [ Selected By Default ]
- Collect data from only the following modules
So when first option is selected , IntelliTrace will not capture the information for all the modules which are specified in the module selection area but in case of Option2, IntelliTrace will collect exact the different information ( Only specified module information will be captured ) .
Let’s consider, we have a simple web application where we have used some custom module ( Says MyClassLib.Dll ) to do some operation. To make it very simple, I wrote on Simple Add() method with in that and been called from the web application. Below is the code block for the class library.
Once the dll has been created, I have used the same in the web application .
Now, I called the Add() method on some button click event of my web application.
IntelliTrace Module setting says, we have selected the first option “Collect data from all modules except for the following”, which means, IntelliTrace can capture the information from my MyClassLib dll. Let’s Press F5 and run the web site and capture the IntelliTrace Debugging information
Well, as shown in above image IntelliTrace Capture the information of Button Click as well as the information from Add() Methods of MyClassLib. If you click on the navigator icon ( marked with red circle ) IntelliTrace windows, it will navigate you to the MyClassLib Code and show you the details of the add methods as shown in below image.
This is what, IntelliTrace capturing the information related the modules. Now, If You don’t wanted to capture the information of MyClass. Let’s go back to the IntelliTrace Settings, and tell IntelliTrace that don’t capture my Module Information.
Click on Add > Provide the string pattern match for the file name ( not Assembly name). Click on “Add” again.
You will get your module list named with other modules name for which you don’t want to capture the information.
Now if you run the application and try to capture the IntelliTrace event, you will find, though button click information has been captured there is no information captured for MyClassLib.dll and MyClass.cs .
Because we explicitly told IntelliTrace not to capture the information of the MyClassLib module.
To make it more clear, let me put the two different IntelliTrace window side by side. First IntelliTrace window says there are no debugging information captured for MyClassLib as we don’t have any further navigator indication where as second IntelliTrace windows saying something different, extra navigator indicates there are further information being captured for MyClassLib module.
Hope this gave you a clear idea how you can use the module capture information with IntelliTrace.
Module Information Capture will only work if you have select for capturing “Event and Call Information” from general settings of IntelliTrace Window. It won’t work for “Event Only Mode”.
For more info read
Hope this will help!
For any question or clarification drop me a message here, will answer as earliest.