1 / 17

Debugger Tips and Tricks for .NET Developers with Microsoft Visual Studio 2015

Discover advanced debugging techniques for .NET developers using Microsoft Visual Studio 2015. Learn essential tips and tricks to enhance your debugging skills and efficiently troubleshoot code issues. This comprehensive guide covers tools like Diagnostic Tools, PerfTips, UI Debugging Tools for XAML, Android Support, Exception Settings, and multi-threaded debugging techniques. Master the art of efficient debugging to streamline your development process and boost productivity.

susieb
Download Presentation

Debugger Tips and Tricks for .NET Developers with Microsoft Visual Studio 2015

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. “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

  3. Agenda 4 Slides of 4 new things Demo (50 minutes) Bonus Multi-Threading Tips

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

  5. PerfTips • 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 http://blogs.msdn.com/b/visualstudioalm/archive/2014/08/18/perftips-performance-information-at-a-glance-while-debugging-with-visual-studio.aspx

  6. UI Debugging Tools for XAML • 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 http://blogs.msdn.com/b/visualstudio/archive/2015/02/24/introducing-the-ui-debugging-tools-for-xaml.aspx

  7. Android Support • Visual Studio Emulator for Android • Project Types • C# (via Xamarin partnership) • C++ • Cordova (JavaScript and HTML) 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

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

  9. DEMO#2 Debugger.IsAttached Debugger.Break() Visualizers (6) Peek Definition (Alt + F12) DebuggerDisplay DataTips • Transparency • Pinning • Floating • Comments Make Object ID Add Watch From Watch

  10. DEMO#3 Conditional Breakpoints Hit Count Breakpoints Lambda Debugging Immediate Window Debug -> Start New Instance Multiple Project Launch Restart TracePoints Edit Variable Value

  11. DEMO#4 Exception Settings Call Stack window • Async • Show Parameter Values • Show External Code Full Screen mode Tasks window

  12. Parallel Stacks window • See the call stacks of all threads in a single window https://msdn.microsoft.com/en-us/library/dd998398.aspx

  13. Threads window • See all threads in the process • Switch between threads • Freeze/thaw threads https://msdn.microsoft.com/en-us/library/w15yf86f.aspx

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

  15. Resources • 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

More Related