When the unexpected happens, how do you figure out what went wrong and recover gracefully? We take a look at the debugging features and capabilities of the latest version of Visual Studio 2010. Where you can take advantage of the tools to simplify and streamline the complex job of debugging software.
Debugging application using visual studio 2010 and intellitrace
1. Debugging Application Using Visual Studio 2010 and Intellitrace Abhimanyu Singhal Lead Consultant iMentor Knowledge Services
2. Debugging involves finding the root cause of the problem Develop-Test-Debug-Fix-Test Cycle ( Non TDD) Test-Develop-Test-Debug-Fix-Test Cycle (TDD) Visual Studio Debugging Introduction
3. How to start debugging? Start Program/Test in Debug Mode Attach to process
4. Are used to notify the debugger where and when to pause the program execution Breakpoints
6. New Feature in Visual Studio 2010 Used for better managing breakpoints Enables group and filter breakpoints Works as categorization of breakpoints Is very helpful when you are debugging multiple lines of codes in a project with many files. Labeling in Breakpoints
8. Use when you want to pause your program on some specific condition Conditions Is True Has Changed Intellisence support in creating complex conditions Conditional Breakpoints
10. Allows you to save different debug scenarios in XML files You can share your breakpoints with other developers on your team You can save breakpoints based on search on labels XML file is a collection of BreakPoints tag within BreakPointCollection Each breakpoint tag contains information about breakpoint Breakpoints import depends on Line Numbers Breakpoints Import/Export
12. used to keep track of how many times the debugger has reached at some particular breakpoint Option like to choose when the debugger will stop Break always Break when the hit count is equal to a specified number Break when the hit count is a multiple of a specified number Break when the hit count is greater than or equal to a specified number Breakpoint Hit Count
19. It is an investigation window various types of watch windows Autos These variables are automatically detect by the VS debugger during the debugging. Shortcut – “Ctrl+D+A” Local It automatically displays the list of variables within the scope of current methods Watch 1…… Watch Windows
21. create an object ID for any particular instance of object helpful when you want to monitor any object at any point of time even if it goes out of scope To create Object Id, from watch window you need to right click on a particular object variable and then need to click on "Make Object ID". Create Object ID
23. Immediate window is very much common and a favorite with all developers It's very much helpful in debug mode of the application if you want to change the variable values execute some statement without impacting your current debugging steps Debug > Window > Immediate Window { Ctrl + D, I / Alt + Ctrl - I } During Debug mode, you can execute any command or execute any code statement from here. Immediate Window
25. have multiple method calling or nested calling all over your application and during debugging you want to check from where this method has invoked The Call Stack Window shows current method calling nesting To customize, Right Click on the "Call Stack" window, and from the context menu, you can select or deselect the option Call Stack
28. Shows ThreadId, Managed Id, Category, Name, Location and Priority You can expand/collapse the Thread Location and can see what is next The Threads Window
29. What will happen if you have a huge code block with multiple number of threads…? Thread window gives you very easy features to set the "Flag" for all the threads which are part of your code Flag Just My Code
33. Works as a DVR and allows you to Revind and Forwarded your application’s recorded execution It is also called historical debugging IntelliTrace operates in the background, records what you are doing during debugging Debugging with Intellitrace