SlideShare une entreprise Scribd logo
1  sur  14
MANAGED DEBUGGING USING WINDBG

BY
Rupreet Singh Gujral (rupreetg@outlook.com)
Entrepreneur. Product strategist. Architect.
AGENDA
• Debugging and Debugger Basics
• Refreshing .NET / CLR Fundamentals
• Various Debugging Tools
• WinDBG: Basic commands
• Demo: Live Process Debugging
• Demo: Live Process Crash Debugging
DEBUGGING AND DEBUGGER BASICS
•

Debugging is a black art! It’s a skill not a technology.

•

Debugging is a technique to find root/unknown causes of bugs which
surface normally or randomly.

•

Putting breakpoint in your source code and stepping through isn’t real
debugging. Debugging is when you don’t have source code at hand and you
want to find root cause of the issue.

•

Debuggers typically can do disassembly, stack traces, expression
watches, and more
DEBUGGING AND DEBUGGER BASICS (CONT…)
•

3 Types of Debugging

•
•
•

•

Launching an application under debugger
Attaching a debugger to a running process (Non-Invasive Debugging)
Invasively attaching a debugger to a running process (Invasive Debugging)

Symbol Files: They annotates the application binary with additional information like
function names, data structure, etc which helps in debugging

•
•

•

Public Symbol Files
Private Symbol Files

“A software tool that is used to detect the source of program or script errors,
by performing step-by-step execution of application code and viewing the
content of code variables.” – MSDN
REFRESHING .NET / CLR FUNDAMENTALS
• Application Domains: Logical boundary in a process to isolate user code
execution.

• Modules: Modules contains the actual code and resources.
• Method Table: Describes a particular type. It includes VT with pointers to
actual code.

• Method Descriptors: Contain detailed information such as textual
representation of method, the module it contain, etc

• Managed Heap: Data structure in memory where all objects – reference types
are stored.
REFRESHING .NET / CLR FUNDAMENTALS
REFRESHING .NET / CLR FUNDAMENTALS

Image concept from Mario Hewardt’s book
HOW DEBUGGER IS INVOKED WHEN
EXCEPTION OCCURS?
• When code is executed in memory and exception occurs like
DivideByZero exception, then –
• First chance exception is raised by .NET Runtime. This happens as soon as
DivideByZeroException object is defined in memory.

• If debugger is attached to the process, then debugger will break and memory
dump can be taken.

• If an appropriate try-catch block is defined, the exception will be handled and
application continues

• If no try-catch block is defined, then second chance exception is raised
• If debugger is attached to the process, then debugger will break and memory
dump can be taken

• If no debugger is attached, then process will crash.
VARIOUS DEBUGGING TOOLS
• Visual Studio: Famous development environment mainly used for source level
debugging. Can be used as user mode debugger for any app.

• CLR Profiler: Profiles the CLR process and spits out report about memory and
other parameters.

• Performance Monitor: Counter based tool, gives real time data about different
parameter like memory, exceptions, handles, etc

• WinDBG: GUI based user mode debugger to debug any kind of application. Can
be used as kernel mode debugger too.

• NTSD: Similar to WinDBG but command line based.
WINDBG: BASIC COMMANDS
•
•
•
•
•
•
•
•
•
•
•
•

0:00> - What this denotes in WinDBG?
.sympath, .sympath+ <newPath>, .reload – symbols related commands
!dumpdomain – app domain related command
!dumpassembly – assembly related command

!clrstack/kv – Stack walking
!runaway – Summary for all threads and time spent on CPU
~<n>s – Thread switching
!dumpheap – heap related command
!do – objects dumping
!dumpmt – dumping Method Tables
!threads – Listing all the managed threads
!dae – exception related commands
DEMO - LIVE PROCESS DEBUGGING
• Attaching debugger to the live process
• Identifying the starting point for debugging
• Internal data structure of the class
• Display content of arrays
• Breakpoint setting
DEMO - LIVE PROCESS CRASH
DEBUGGING
• Attach debugger to the live process
• Handle first chance exception
• Track exception
Q&A
Aim and shoot your questions!

Image source: http://egamer.co.za/2011/07/review-shadows-of-the-damned/
THANK YOU!

Image Source: http://www.comicvine.com/forums/battles-7/spiderman-vs-wesker-670859/

Contenu connexe

Dernier

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Dernier (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Managed Debugging using WinDBG

  • 1. MANAGED DEBUGGING USING WINDBG BY Rupreet Singh Gujral (rupreetg@outlook.com) Entrepreneur. Product strategist. Architect.
  • 2. AGENDA • Debugging and Debugger Basics • Refreshing .NET / CLR Fundamentals • Various Debugging Tools • WinDBG: Basic commands • Demo: Live Process Debugging • Demo: Live Process Crash Debugging
  • 3. DEBUGGING AND DEBUGGER BASICS • Debugging is a black art! It’s a skill not a technology. • Debugging is a technique to find root/unknown causes of bugs which surface normally or randomly. • Putting breakpoint in your source code and stepping through isn’t real debugging. Debugging is when you don’t have source code at hand and you want to find root cause of the issue. • Debuggers typically can do disassembly, stack traces, expression watches, and more
  • 4. DEBUGGING AND DEBUGGER BASICS (CONT…) • 3 Types of Debugging • • • • Launching an application under debugger Attaching a debugger to a running process (Non-Invasive Debugging) Invasively attaching a debugger to a running process (Invasive Debugging) Symbol Files: They annotates the application binary with additional information like function names, data structure, etc which helps in debugging • • • Public Symbol Files Private Symbol Files “A software tool that is used to detect the source of program or script errors, by performing step-by-step execution of application code and viewing the content of code variables.” – MSDN
  • 5. REFRESHING .NET / CLR FUNDAMENTALS • Application Domains: Logical boundary in a process to isolate user code execution. • Modules: Modules contains the actual code and resources. • Method Table: Describes a particular type. It includes VT with pointers to actual code. • Method Descriptors: Contain detailed information such as textual representation of method, the module it contain, etc • Managed Heap: Data structure in memory where all objects – reference types are stored.
  • 6. REFRESHING .NET / CLR FUNDAMENTALS
  • 7. REFRESHING .NET / CLR FUNDAMENTALS Image concept from Mario Hewardt’s book
  • 8. HOW DEBUGGER IS INVOKED WHEN EXCEPTION OCCURS? • When code is executed in memory and exception occurs like DivideByZero exception, then – • First chance exception is raised by .NET Runtime. This happens as soon as DivideByZeroException object is defined in memory. • If debugger is attached to the process, then debugger will break and memory dump can be taken. • If an appropriate try-catch block is defined, the exception will be handled and application continues • If no try-catch block is defined, then second chance exception is raised • If debugger is attached to the process, then debugger will break and memory dump can be taken • If no debugger is attached, then process will crash.
  • 9. VARIOUS DEBUGGING TOOLS • Visual Studio: Famous development environment mainly used for source level debugging. Can be used as user mode debugger for any app. • CLR Profiler: Profiles the CLR process and spits out report about memory and other parameters. • Performance Monitor: Counter based tool, gives real time data about different parameter like memory, exceptions, handles, etc • WinDBG: GUI based user mode debugger to debug any kind of application. Can be used as kernel mode debugger too. • NTSD: Similar to WinDBG but command line based.
  • 10. WINDBG: BASIC COMMANDS • • • • • • • • • • • • 0:00> - What this denotes in WinDBG? .sympath, .sympath+ <newPath>, .reload – symbols related commands !dumpdomain – app domain related command !dumpassembly – assembly related command !clrstack/kv – Stack walking !runaway – Summary for all threads and time spent on CPU ~<n>s – Thread switching !dumpheap – heap related command !do – objects dumping !dumpmt – dumping Method Tables !threads – Listing all the managed threads !dae – exception related commands
  • 11. DEMO - LIVE PROCESS DEBUGGING • Attaching debugger to the live process • Identifying the starting point for debugging • Internal data structure of the class • Display content of arrays • Breakpoint setting
  • 12. DEMO - LIVE PROCESS CRASH DEBUGGING • Attach debugger to the live process • Handle first chance exception • Track exception
  • 13. Q&A Aim and shoot your questions! Image source: http://egamer.co.za/2011/07/review-shadows-of-the-damned/
  • 14. THANK YOU! Image Source: http://www.comicvine.com/forums/battles-7/spiderman-vs-wesker-670859/