DebuggingDemos
DebuggingDemos copied to clipboard
Demos for .NET Debugging Presentations
DebuggingDemos
Demos for .NET Debugging Presentations
If you came here looking for debugging info or labs, check out my blog https://www.tessferrandez.com
Preparations
- Install DebugDiag
- Install ProcDump
- Install WinDbg
- Download and compile Netling easy load tester
- In WinDbg, Set the sympath to srv*c:\symcache*https://msdl.microsoft.com/download/symbols and save workspace
Use magnifier with bar to manify command in windbg
Capture demo dumps
- Crash - Presidents demo - next on Obama
- Crash - MyShop - Contact - Email=Test --- need to capture with a debug diag rule, dump on first chance stack overflow
- Hang - MyShop - Products - Netling 8/10/1 (can take with taskmanager if you set up vdir in real IIS 64 bit)
- Memory - MyShop - News - Netling 4/10/1 (take one baseline before and one leak after)
Script
Dump walkthrough
-
Open crash 1 in WinDbg
-
Add commands to scratchpad
-
Walk through commands and explain what we can find in a memory dump
~* kb .loadby sos clr !clrstack !dso !do <exception> !objsize <exception> !click <message> !gcroot <message> lm !eeheap -gc !dumpheap -stat
Crash 1
- Repro crash in presidents - next on Obama
- Procdump -ma ThePresidents.exe -e
- in Windbg !clrstack and !dso
- Open in Debug Diag
- exception on stack 0
- stack of T0
- previous exceptions
- discuss SOF/OOM/EE
- Open in Visual Studio (managed)
- Open event viewer
(*) debug diag rules
Hang 1
- Browse to Products (MyShop)
- Netling 8/10/1 + task manager (check CPU)
- Netling again - dump with task manager (*) Windbg - show lots of same stacks
- Debug Diag
- show wait
- http context report
- Visual studio (Mixed??)
- Parallel stacks
Hang 2
- Open presidents, show slowness on next
- Analyze/Performance Profiler
- Performance wizard
- Instrumentation
- Repro / Stop profiling
- Summary - App.Run - move down path
Memory 1
- Browse news
- dump for comparison
- Netling 4/10/1
- Dump leak
- Open in VS
- sort by size diff bytes
- newscontroller root down
- Open in Debug Diag
- see cache
(*) open in Windbg and debug with !gcroot etc.
Slides available on my Slideshare