3-677: Debugger Tips and Tricks for .NET Developers with Visual Studio 2015

Come to this all-demo session to learn how to make the most of the Visual Studio debugger. We tour almost all of the debugger throwing in tips and tricks as we go along, and also calling out what is brand new in the latest version of the debugger in Visual Studio 2015. Whatever your experience level, we guarantee you will learn something new!

1.0x

3-677: Debugger Tips and Tricks for .NET Developers with Visual Studio 2015

Created 2 years ago

Duration 1:00:26
lesson view count 2110
Come to this all-demo session to learn how to make the most of the Visual Studio debugger. We tour almost all of the debugger throwing in tips and tricks as we go along, and also calling out what is brand new in the latest version of the debugger in Visual Studio 2015. Whatever your experience level, we guarantee you will learn something new!
Select the file type you wish to download
Slide Content
  1. 3-677

    Slide 1 - 3-677

    • Debugger Tips and Tricks for .NET Developers with Microsoft Visual Studio 2015
    • Andrew Hall
    • Senior Program Manager
    • andrew.hall@microsoft.com
  2. 3-677

    Slide 2 - 3-677

    • Debugger Tips and Tricks for .NET Developers with Microsoft Visual Studio 2015
    • Andrew Hall
    • Senior Program Manager
    • andrew.hall@microsoft.com
  3. “Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?”

    Slide 3 - “Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?”

    • Brian Kernighan, Computer Scientist
    • “As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.”
    • Sir Maurice Wilkes, Computer Scientist
  4. 4 Slides of 4 new things

    Slide 4 - 4 Slides of 4 new things

    • Demo (50 minutes)
    • Bonus Multi-Threading Tips
    • Agenda
  5. Diagnostic Tools window

    Slide 5 - Diagnostic Tools window

    • http://blogs.msdn.com/b/visualstudioalm/archive/2015/01/16/diagnostic-tools-debugger-window-in-visual-studio-2015.aspx
    • Memory and CPU graphs
    • Memory tooling
    • Debugger break event history
    • Output window content*
    • IntelliTrace events*
    • *Enterprise SKU only
  6. Quickly measure time between breaks

    Slide 6 - Quickly measure time between breaks

    • Excludes major debugger related overhead
    • Time stopped under the debugger (e.g. stopped at a breakpoint)
    • Symbol loading
    • Etc.
    • Best suited for order of magnitude measurements
    • Greatest accuracy on CLR 4.6 and Windows 10
    • PerfTips
    • http://blogs.msdn.com/b/visualstudioalm/archive/2014/08/18/perftips-performance-information-at-a-glance-while-debugging-with-visual-studio.aspx
  7. Diagnostic Tools window

    Slide 7 - Diagnostic Tools window

    • http://blogs.msdn.com/b/visualstudioalm/archive/2015/01/16/diagnostic-tools-debugger-window-in-visual-studio-2015.aspx
    • Memory and CPU graphs
    • Memory tooling
    • Debugger break event history
    • Output window content*
    • IntelliTrace events*
    • *Enterprise SKU only
  8. Quickly measure time between breaks

    Slide 8 - Quickly measure time between breaks

    • Excludes major debugger related overhead
    • Time stopped under the debugger (e.g. stopped at a breakpoint)
    • Symbol loading
    • Etc.
    • Best suited for order of magnitude measurements
    • Greatest accuracy on CLR 4.6 and Windows 10
    • PerfTips
    • http://blogs.msdn.com/b/visualstudioalm/archive/2014/08/18/perftips-performance-information-at-a-glance-while-debugging-with-visual-studio.aspx
  9. Inspect the live visual tree while debugging

    Slide 9 - Inspect the live visual tree while debugging

    • Updates in real time
    • Jump to source
    • Live property explorer
    • See any element’s properties in real time
    • Selection by clicking on the app
    • UI Debugging Tools for XAML
    • http://blogs.msdn.com/b/visualstudio/archive/2015/02/24/introducing-the-ui-debugging-tools-for-xaml.aspx
  10. Quickly measure time between breaks

    Slide 10 - Quickly measure time between breaks

    • Excludes major debugger related overhead
    • Time stopped under the debugger (e.g. stopped at a breakpoint)
    • Symbol loading
    • Etc.
    • Best suited for order of magnitude measurements
    • Greatest accuracy on CLR 4.6 and Windows 10
    • PerfTips
    • http://blogs.msdn.com/b/visualstudioalm/archive/2014/08/18/perftips-performance-information-at-a-glance-while-debugging-with-visual-studio.aspx
  11. Visual Studio Emulator for Android

    Slide 11 - Visual Studio Emulator for Android

    • Project Types
    • C# (via Xamarin partnership)
    • C++
    • Cordova (JavaScript and HTML)
    • Android Support
    • http://blogs.msdn.com/b/visualstudioalm/archive/2014/11/12/introducing-visual-studio-s-emulator-for-android.aspx
    • http://blogs.msdn.com/b/visualstudioalm/archive/2014/11/12/debugging-c-code-on-android-with-visual-studio-2015.aspx
  12. Project Properties Launch Options

    Slide 12 - Project Properties Launch Options

    • Start with Stepping,
    • Return Values
    • Set Next Statement
    • Step Into Specific
    • Run to Cursor
    • Edit and Continue
    • Step Out
    • DEMO #1
  13. Project Properties Launch Options

    Slide 13 - Project Properties Launch Options

    • Start with Stepping,
    • Return Values
    • Set Next Statement
    • Step Into Specific
    • Run to Cursor
    • Edit and Continue
    • Step Out
    • DEMO #1
  14. Project Properties Launch Options

    Slide 14 - Project Properties Launch Options

    • Start with Stepping,
    • Return Values
    • Set Next Statement
    • Step Into Specific
    • Run to Cursor
    • Edit and Continue
    • Step Out
    • DEMO #1
  15. 4 Slides of 4 new things

    Slide 15 - 4 Slides of 4 new things

    • Demo (50 minutes)
    • Bonus Multi-Threading Tips
    • Agenda
  16. Project Properties Launch Options

    Slide 16 - Project Properties Launch Options

    • Start with Stepping,
    • Return Values
    • Set Next Statement
    • Step Into Specific
    • Run to Cursor
    • Edit and Continue
    • Step Out
    • DEMO #1
  17. Project Properties Launch Options

    Slide 17 - Project Properties Launch Options

    • Start with Stepping,
    • Return Values
    • Set Next Statement
    • Step Into Specific
    • Run to Cursor
    • Edit and Continue
    • Step Out
    • DEMO #1
  18. Project Properties Launch Options

    Slide 18 - Project Properties Launch Options

    • Start with Stepping,
    • Return Values
    • Set Next Statement
    • Step Into Specific
    • Run to Cursor
    • Edit and Continue
    • Step Out
    • DEMO #1
  19. Project Properties Launch Options

    Slide 19 - Project Properties Launch Options

    • Start with Stepping,
    • Return Values
    • Set Next Statement
    • Step Into Specific
    • Run to Cursor
    • Edit and Continue
    • Step Out
    • DEMO #1
  20. See the call stacks of all threads in a single window

    Slide 20 - See the call stacks of all threads in a single window

    • Parallel Stacks window
    • https://msdn.microsoft.com/en-us/library/dd998398.aspx
  21. Exception Settings

    Slide 21 - Exception Settings

    • Call Stack window
    • Async
    • Show Parameter Values
    • Show External Code
    • Full Screen mode
    • Tasks window
    • DEMO #4
  22. See the call stacks of all threads in a single window

    Slide 22 - See the call stacks of all threads in a single window

    • Parallel Stacks window
    • https://msdn.microsoft.com/en-us/library/dd998398.aspx
  23. Show threads in source

    Slide 23 - Show threads in source

    • Run selected threads to cursor
    • Debug Location Toolbar
    • Filter breakpoint
    • Additional Multi-Threaded tips
    • https://msdn.microsoft.com/en-us/library/ms164746.aspx
  24. See all threads in the process

    Slide 24 - See all threads in the process

    • Switch between threads
    • Freeze/thaw threads
    • Threads window
    • https://msdn.microsoft.com/en-us/library/w15yf86f.aspx
  25. Show threads in source

    Slide 25 - Show threads in source

    • Run selected threads to cursor
    • Debug Location Toolbar
    • Filter breakpoint
    • Additional Multi-Threaded tips
    • https://msdn.microsoft.com/en-us/library/ms164746.aspx
  26. Show threads in source

    Slide 26 - Show threads in source

    • Run selected threads to cursor
    • Debug Location Toolbar
    • Filter breakpoint
    • Additional Multi-Threaded tips
    • https://msdn.microsoft.com/en-us/library/ms164746.aspx
  27. Show threads in source

    Slide 27 - Show threads in source

    • Run selected threads to cursor
    • Debug Location Toolbar
    • Filter breakpoint
    • Additional Multi-Threaded tips
    • https://msdn.microsoft.com/en-us/library/ms164746.aspx
  28. Diagnostics Blog http://aka.ms/diagnosticsblog

    Slide 28 - Diagnostics Blog http://aka.ms/diagnosticsblog

    • Other Sessions:
    • 3-731 Debugging Performance Issues Using Visual Studio 2015
    • 3-771 Historical Debugging with IntelliTrace in Visual Studio 2015
    • 2-627 Strategies for Developing Cross-Platform Applications with Visual Studio 2015
    • 3-714 Building Cross-Platform Mobile Apps in C++ with Visual Studio 2015
    • Resources