Title: Five Tools You Can Use Beyond Visual Studio
1.NET Debugging
Five Tools You Can Use Beyond Visual Studio
Alan Cobb - Consultantwww.alancobb.com
1
2Outline
Why should you care?Details of five tools
Break
Use tools on example bugs
1
3Question
Why should you care?
1
4Question
Are there any major drawbacksto .NET development?
1
5One .NET drawback
Initial coding easier,but debugging can be
harder.
1
6Layer diagram
Your .NET app
.NET classes and CLR
Windows OS
1
7 Angry Customer Frustrated Developer
1
8Bug Found Everybody Is Happy
1
9About Alan Cobb
Consultant - www.alancobb.com - Programming on
Microsoft platforms since DOS era-
C/C, MFC, now .NET - Mixture system and
apps
1
10Five Tools in Detail
2
11Five .NET Debugging Tools
Frequent Use - DebugView - FileMon -
Process Explorer
Heavy Duty - ADPlus - WinDbg SOS
Extension
2
12Frequent Use Tools
3
13Frequent Use Tools
Frequent Use - DebugView - FileMon -
Process Explorer
3
14Frequent Use Tools
- Where to get them?
- Free download fromwww.sysinternals.com
3
15Download from SysInternals.com
3
16Book from author of SysInternals tools
3
17DebugView
3
18DebugView
3
19DebugView
3
20DebugView
3
21Additional material - Hidden
- High end logging options
- Enterprise Librarys Logging and Instrumentation
Application Block - EIF (Enterprise Instrumentation
Framework)Superceeded by Enterprise
LibrarySays why here http//msdn.microsoft.com/
vstudio/enterprise/EIF/ - Uses of DebugView
- BizTalk
- http//biztalkug.com/Newsgroups/orchestration/8047
1.aspx - Supports idea that normally people think of
Trace.WriteLine needed VS to view.
3
22FileMon
3
23FileMon
3
24FileMon
3
25FileMon - ltHiddengt
3
26FileMon
3
27FileMon
3
28FileMon
3
29FileMon - ltHiddengt
ltMore usesgt
3
30Process Explorer
4
31Process Explorer
- How useful for .NET developer?
4
32Reviewing Windows Task Manager
4
33Task Manager shows CPU usage
4
34Process Explorer Listing OS handles
4
35 Process Explorer - ltHiddengt
ltHow use handle list?gt
4
36Process Explorer Find DLL
4
37Sample SimpleHelloWorld.exe
4
38.NET programs highlighted yellow
4
39Assemblies-DLLs Used
4
40Assembly-DLL Descriptions
4
41VS Debuggers Module List
4
42Heavy Duty Tools
5
43Five .NET Debugging Tools
Frequent Use - DebugView - FileMon -
Process Explorer
Heavy Duty - ADPlus - WinDbg SOS
Extension
5
44Debugging Tools for Windows
- Where to get them?
- Free from Microsoft
- Download from
- http//www.microsoft.com/whdc/DevTools/Debugging/
default.mspx - Or Google for WinDbg download
5
45Debugging Tools for Windows Home page
http//www.microsoft.com/whdc/DevTools/Debugging/d
efault.mspx
5
46ADPlus and WinDbg
- How useful to .NET apps developers?
5
47Production Debugging
- After released to customer
- Usually no Visual Studio
5
48Production Debugging ltHiddengt
5
49Using ADPlus and WinDbg
- Snapshot a dump file with ADPlus
- Analyze dump file with WinDbg SOS
5
50Production Debugging ltHiddengt
5
51DTFW Relationships
ADPlus.VBS (debugger control script)
Debugger user
interfaces
WinDbg.EXE
CDB.EXE
Debugger
DLLs
Main debugger DLLs
Understands managed code SOS.DLL
5
52Example Bug Diagnosis
6
53Types of Bugs
-
- - Crash / Exception
- Hang
- Memory Leak
- Other
6
54Bug Demo App
6
55Crash in Main Thread
6
56Dump File
6
57WinDbg Viewing Dump File
6
58Stack Trace with WinDbg
6
59Conclusion
C
60Conclusion
Questions?
C
61Review
Review - .NET debugging can be harder -
One solution Learn tools Skills - Get
good stack trace - Create use dump file
C
62 Angry Customer Frustrated Developer
C
63Bug Found Everybody Is Happy
C
64Conclusion
.NET debugging in the future?
C
65Conclusion
- Summary handout - Presentation evaluation
C
66- End -
C