ݺߣ

ݺߣShare a Scribd company logo
2ª Reunião PresencialComunidade Portuguesa de SharePoint12/06/2010
   AgendaSession goalsDefinitionHow hard can it be?Screen dumpsLogsCode debugWeb debugRuntime & kernel debug
Session goalsDebugging overviewDebug toolsWhere to go from here
   DefinitionIn wikipedia:Debuggingis 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.
   DefinitionIn wikipedia:Debuggingis 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.
   Bottom lineDebug = Solve a problemTechniques + Tools = gather information
Debug: How hard can it be?
Depends on how it was built...
Screen dumpsSetup your web.config
LogsEvent logs (eventvwr)IIS Logs (c:\windows\system32\logfiles\...)ULS (...\12\logs)Custom logs (i.e. Ent. Lib.)
Code debugVisual studio w/ code solutionAttach the right process:W3wpOwstimer
WebdebugSoap toolkit tracer (deprecated but very usefull)FiddlerWireshark (protocol analizer)
Runtime debug: kernel outputMessages are thrown to the kernelAny tool can plug into the kernel and read the messagesSysinternals Debug view
Runtimedebug: kernel (windbg)Attach directly to a processIdentify process with windbgMain commands.loadby sos mscorwksSxe clr!g (F5)!pe!do | !da!dso-clrstack –a!analize
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!!
Further readingTess Ferrandez (http://blogs.msdn.com/b/tess/) Production Debugging for .NET Framework Applications (P&P) http://msdn.microsoft.com/en-us/library/ee817663.aspxhttp://www.microsoft.com/whdc/DevTools/Debugging/default.mspxDebugger 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
2ª Reunião PresencialComunidade Portuguesa de SharePoint12/06/2010

More Related Content

Spug pt session2 - debuggingl

  • 1. 2ª Reunião PresencialComunidade Portuguesa de SharePoint12/06/2010
  • 2. AgendaSession goalsDefinitionHow hard can it be?Screen dumpsLogsCode debugWeb debugRuntime & kernel debug
  • 3. Session goalsDebugging overviewDebug toolsWhere to go from here
  • 4. DefinitionIn wikipedia:Debuggingis 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.
  • 5. DefinitionIn wikipedia:Debuggingis 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.
  • 6. Bottom lineDebug = Solve a problemTechniques + Tools = gather information
  • 7. Debug: How hard can it be?
  • 8. Depends on how it was built...
  • 10. LogsEvent logs (eventvwr)IIS Logs (c:\windows\system32\logfiles\...)ULS (...\12\logs)Custom logs (i.e. Ent. Lib.)
  • 11. Code debugVisual studio w/ code solutionAttach the right process:W3wpOwstimer
  • 12. WebdebugSoap toolkit tracer (deprecated but very usefull)FiddlerWireshark (protocol analizer)
  • 13. Runtime debug: kernel outputMessages are thrown to the kernelAny tool can plug into the kernel and read the messagesSysinternals Debug view
  • 14. Runtimedebug: kernel (windbg)Attach directly to a processIdentify process with windbgMain commands.loadby sos mscorwksSxe clr!g (F5)!pe!do | !da!dso-clrstack –a!analize
  • 15. 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!!
  • 16. Further readingTess Ferrandez (http://blogs.msdn.com/b/tess/) Production Debugging for .NET Framework Applications (P&P) http://msdn.microsoft.com/en-us/library/ee817663.aspxhttp://www.microsoft.com/whdc/DevTools/Debugging/default.mspxDebugger 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
  • 17. 2ª Reunião PresencialComunidade Portuguesa de SharePoint12/06/2010

Editor's Notes

  • #11: Event logs: * abrir o event viewer e mostrar alguns eventosIIS * abir o inetmgr * entrar num site e ver a localização dos seus logs * ir por file system e abrir os logsULS * abrir os logs e mostrar o tipo de informação que lá existe * abrir a central administration e mostrar a localização da configuração dos logs
  • #12: Sample1.aspx – mostrar um estoiro com informação.Sample1_ok.aspx – mostra página OKSample
  • #13: Montar um sample com vários postbacksSAMPLE3
  • #14: Sample2.aspx
  • #15: Montar um troço interessante