IntelliTrace is a new feature that is introduced by Microsoft in Visual Studio 2010 for putting the debugging in the fast track. It will reduce the time taken by debugging an application by reducing the number of debugging passes required to be executed by the developer.Traditional debugger allows a developer to set a breakpoint in the code and when the debugger hits that breakpoint, it takes a pause in the execution. At this point, the developer can view the snapshot of the state of the application, including various variables, call stack etc. Debugger also allows the step by step tracing of the application in the forward direction. What it does not allow is to know what has happened earlier during the execution. Some logical error might have happened in the program during earlier execution of some statement which is not traceable. Developer has to stop the debugging, set a breakpoint somewhere earlier in the program and restart the debugging. IntelliTrace allows all the traditional facilities of the debugger and also has added an ability to trace the application step by step backward till an error that might have happened earlier is found out. In this way now the second or any number of subsequent passes that would have been required in the traditional debugger are avoided. IntelliTrace starts collecting the data as soon as any debugger session has started in Visual Studio 2010. It stores the data that it collects in a file which has an extension of .iTrace and that file can be sent to another user for reviewing a session.Let us view the details of IntelliTrace with an example. We are creating an interest calculator that is a Windows Forms application. It needs to accept the principal amount and tenure in number of days from the user; calculate interest and show the interest and final amount to the user on the same form. Interest rate is based upon the tenure table of rates is stored in the database. We have created two components in addition to the windows form. First component rationalizes the tenure so that it is in the number of days as expected in the database. Second component is a data access component that gets the rate from the database and provides it to first component. As per the calculation we expect the rate of interest for 180 to 360 days to be 4.5% PA and above that it should be 5%. Against expectation, when developer enters 361 to 364 days as tenure it still returns the rate at 4.5% PA. We need to debug the code to sort out the error.We start by checking that IntelliTrace is enabled. This is done from a menu item Tools – Options – IntelliTrace.
View the Original article