際際滷

際際滷Share a Scribd company logo
Debugging Application Using Visual Studio 2010 and IntellitraceAbhimanyu SinghalLead ConsultantiMentor Knowledge Services
Debugging involves finding the root cause of the problemDevelop-Test-Debug-Fix-Test Cycle ( Non TDD)Test-Develop-Test-Debug-Fix-Test Cycle (TDD)Visual Studio Debugging Introduction
How to start debugging?Start Program/Test in Debug ModeAttach to process
Are used to notify the debugger where and when to pause the program executionBreakpoints
Demo  Breakpoints
New Feature in Visual Studio 2010Used for better managing breakpointsEnables group and filter breakpointsWorks as categorization of breakpointsIs very helpful when you are debugging multiple lines of codes in a project with many files.Labeling in Breakpoints
Demo  Using Breakpoint Labeling
Use when you want to pause your program on some specific conditionConditionsIs TrueHas ChangedIntellisence support in creating complex conditionsConditional Breakpoints
Demo  Creating and Using Conditional Breakpoints
Allows you to save different debug scenarios in XML filesYou can share your breakpoints with other developers on your teamYou can save breakpoints based on search on labelsXML file is a collection of BreakPoints tag within BreakPointCollectionEach breakpoint tag contains information about breakpointBreakpoints import depends on Line NumbersBreakpoints Import/Export
Demo  Using Breakpoints Import/Export
used to keep track of how many times the debugger has reached at some particular breakpointOption like to choose when the debugger will stopBreak 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 numberBreakpoint Hit Count
Demo  Using Breakpoint Hit Count
You want to do something else while breakpoint is hitPrint a messageRun a MacroBreakpoint When Hit Option
Demo  Using Breakpoint when Hit Option
Restrict the breakpoint to hit for certain processes and threadsBreakpoint Filter
Pin Inspect Value during debuggingDrag-Drop Pin Data TipAdding CommentsLast Session Debug ValueExport/Import Data TipsChange Value using Data TipsClear Data TipsClear AllClear Pinned to specific fileData Tips
Demo  Using Data tips
It is an investigation windowvarious types of watch windows AutosThese variables are automatically detect by the VS debugger during the debugging.Shortcut  Ctrl+D+ALocalIt automatically displays the list of variables within the scope of current methodsWatch 1Watch Windows
Demo  Using Watch Window
create an object ID for any particular instance of objecthelpful when you want to monitor any object at any point of time even if it goes out of scopeTo 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
Demo  Using Create Object ID
Immediate window is very much common and a favorite with all developersIt's very much helpful in debug mode of the applicationif you want to change the variable values execute some statement without impacting your current debugging stepsDebug > 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
Demo  Using Immediate Window
have multiple method calling or nested calling all over your application and during debuggingyou want to check from where this method has invokedThe Call Stack Window shows current method calling nestingTo customize, Right Click on the "Call Stack" window, and from the context menu, you can select or deselect the optionCall Stack
Demo - Using Call Stack
Debugging Multithreaded Applications and Parallel Programs
Shows ThreadId, Managed Id, Category, Name, Location and PriorityYou can expand/collapse the Thread Location and can see what is nextThe Threads Window
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 codeFlag Just My Code
Break Point Filter  Multithreaded Programming
Demo -  Using Threads Window
Parallel TasksParallel StacksParallel Programming Windows
Works as a DVR and allows you to Revind and Forwarded your applications recorded executionIt is also called historical debuggingIntelliTrace operates in the background, records what you are doing during debuggingDebugging with Intellitrace
Demo  Using Intellitrace
Abhimanyu Singhalabhimanyu@imentor.co.in@abhi_singhalThank you

More Related Content

Debugging application using visual studio 2010 and intellitrace

  • 1. Debugging Application Using Visual Studio 2010 and IntellitraceAbhimanyu SinghalLead ConsultantiMentor Knowledge Services
  • 2. Debugging involves finding the root cause of the problemDevelop-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 ModeAttach to process
  • 4. Are used to notify the debugger where and when to pause the program executionBreakpoints
  • 6. New Feature in Visual Studio 2010Used for better managing breakpointsEnables group and filter breakpointsWorks as categorization of breakpointsIs very helpful when you are debugging multiple lines of codes in a project with many files.Labeling in Breakpoints
  • 7. Demo Using Breakpoint Labeling
  • 8. Use when you want to pause your program on some specific conditionConditionsIs TrueHas ChangedIntellisence support in creating complex conditionsConditional Breakpoints
  • 9. Demo Creating and Using Conditional Breakpoints
  • 10. Allows you to save different debug scenarios in XML filesYou can share your breakpoints with other developers on your teamYou can save breakpoints based on search on labelsXML file is a collection of BreakPoints tag within BreakPointCollectionEach breakpoint tag contains information about breakpointBreakpoints import depends on Line NumbersBreakpoints Import/Export
  • 11. Demo Using Breakpoints Import/Export
  • 12. used to keep track of how many times the debugger has reached at some particular breakpointOption like to choose when the debugger will stopBreak 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 numberBreakpoint Hit Count
  • 13. Demo Using Breakpoint Hit Count
  • 14. You want to do something else while breakpoint is hitPrint a messageRun a MacroBreakpoint When Hit Option
  • 15. Demo Using Breakpoint when Hit Option
  • 16. Restrict the breakpoint to hit for certain processes and threadsBreakpoint Filter
  • 17. Pin Inspect Value during debuggingDrag-Drop Pin Data TipAdding CommentsLast Session Debug ValueExport/Import Data TipsChange Value using Data TipsClear Data TipsClear AllClear Pinned to specific fileData Tips
  • 18. Demo Using Data tips
  • 19. It is an investigation windowvarious types of watch windows AutosThese variables are automatically detect by the VS debugger during the debugging.Shortcut Ctrl+D+ALocalIt automatically displays the list of variables within the scope of current methodsWatch 1Watch Windows
  • 20. Demo Using Watch Window
  • 21. create an object ID for any particular instance of objecthelpful when you want to monitor any object at any point of time even if it goes out of scopeTo 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
  • 22. Demo Using Create Object ID
  • 23. Immediate window is very much common and a favorite with all developersIt's very much helpful in debug mode of the applicationif you want to change the variable values execute some statement without impacting your current debugging stepsDebug > 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
  • 24. Demo Using Immediate Window
  • 25. have multiple method calling or nested calling all over your application and during debuggingyou want to check from where this method has invokedThe Call Stack Window shows current method calling nestingTo customize, Right Click on the "Call Stack" window, and from the context menu, you can select or deselect the optionCall Stack
  • 26. Demo - Using Call Stack
  • 27. Debugging Multithreaded Applications and Parallel Programs
  • 28. Shows ThreadId, Managed Id, Category, Name, Location and PriorityYou can expand/collapse the Thread Location and can see what is nextThe 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 codeFlag Just My Code
  • 30. Break Point Filter Multithreaded Programming
  • 31. Demo - Using Threads Window
  • 33. Works as a DVR and allows you to Revind and Forwarded your applications recorded executionIt is also called historical debuggingIntelliTrace operates in the background, records what you are doing during debuggingDebugging with Intellitrace
  • 34. Demo Using Intellitrace