Download - Spug pt session2 - debuggingl
![Page 1: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/1.jpg)
Comunidade Portuguesa de SharePoint
2ª Reunião Presencial
12/06/2010
![Page 2: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/2.jpg)
Agenda
• Session goals• Definition• How hard can it be?• Screen dumps• Logs• Code debug• Web debug• Runtime & kernel debug
![Page 3: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/3.jpg)
Session goals
• Debugging overview• Debug tools• Where to go from here
![Page 4: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/4.jpg)
In wikipedia:
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. … it involves numerous aspects, including: interactive debugging, control flow, integration testing, log files, monitoring, memory dumps, Statistical Process Control, and special design tactics to improve detection while simplifying changes.
Definition
![Page 5: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/5.jpg)
In wikipedia:
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. … it involves numerous aspects, including: interactive debugging, control flow, integration testing, log files, monitoring, memory dumps, Statistical Process Control, and special design tactics to improve detection while simplifying changes.
Definition
![Page 6: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/6.jpg)
Debug = Solve a problem
Techniques + Tools = gather information
Bottom line
![Page 7: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/7.jpg)
Debug: How hard can it be?
![Page 8: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/8.jpg)
Depends on how it was built...
![Page 9: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/9.jpg)
Screen dumps
• Setup your web.config
![Page 10: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/10.jpg)
Logs
• Event logs (eventvwr)• IIS Logs (c:\windows\system32\logfiles\...)• ULS (...\12\logs)• Custom logs (i.e. Ent. Lib.)
![Page 11: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/11.jpg)
Code debug
• Visual studio w/ code solution• Attach the right process:– W3wp– Owstimer
![Page 12: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/12.jpg)
Web debug
• Soap toolkit tracer (deprecated but very usefull)• Fiddler• Wireshark (protocol analizer)
![Page 13: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/13.jpg)
Runtime debug: kernel output
• Messages are thrown to the kernel• Any tool can plug into the kernel and read the
messages• Sysinternals Debug view
![Page 14: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/14.jpg)
Runtime debug: kernel (windbg)
• Attach directly to a process• Identify process with windbg• Main commands– .loadby sos mscorwks– Sxe clr– !g (F5)– !pe– !do | !da– !dso– -clrstack –a– !analize
![Page 15: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/15.jpg)
Toolbox (some tools)
• MS windbg (http://www.microsoft.com/whdc/devtools/debugging/default.mspx) • Sysinternals tools: process explorer, debug view (http://live.sysinternals.com)• Fiddler (http://www.fiddler2.com/fiddler2/) • Soap Trace Utility (
http://www.microsoft.com/downloads/details.aspx?familyid=c943c0dd-ceec-4088-9753-86f052ec8450&displaylang=en)
• Please fill IN!!
![Page 16: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/16.jpg)
Further reading
• Tess Ferrandez (http://blogs.msdn.com/b/tess/) • Production Debugging for .NET Framework Applications (P&P) http://
msdn.microsoft.com/en-us/library/ee817663.aspx • http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx
– Debugger How-Tos Driver Tip: Debugging Windows Vista – Improve Driver Debugability – 1394 Kernel Debugging Tips and Tricks [WinHEC 2004; 373 KB]– Advanced Driver Debugging [336 KB] – Driver Debugging Basics [WinHEC 2007; 633 KB] – Debugging Kernel-Mode Driver Framework Drivers – Debugging User-Mode Driver Framework Drivers Training Sessions – Debugging Tools for Windows (MSDN) – HOWTO: Enable Verbose Debug Tracing in Various Drivers and Subsystems (314743) – WDK Online: Tools for Debugging Drivers
![Page 17: Spug pt session2 - debuggingl](https://reader036.vdocuments.us/reader036/viewer/2022062319/554f7967b4c905435d8b4645/html5/thumbnails/17.jpg)
Comunidade Portuguesa de SharePoint
2ª Reunião Presencial
12/06/2010