SlideShare a Scribd company logo
Debugging Basics
MUHAMMAD AMIR – XAVOR LAHORE
Software Bugs r Expensive
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code
as cleverly as possible, you are, by definition, not smart enough to debug it.
Brian Kernighan
Getting Started!
 Debugging Basics: http://msdn.microsoft.com/en-us/library/aa290881%28v=vs.71%29.aspx
Debugging Basics
What are you trying to find and fix?
◦ Two main types of code errors
◦ Syntax: Compiler catches most if not all of these for you.
◦ Semantic or logical: Syntactically correct yet program may “crash and burn” at run-time!
 Autos
 Locals
 Watch
 Call Stack
 Command Window
 QuickWatch Dialog
 Breakpoints window
 Threads
 Modules
 Processes
 Memory
 Disassembly
 Registers
Debugging Tools for Inspection Your Program
Execution Control: Breakpoints
Stepping through your code
 Starting / Stopping
 Breaking
 Stepping through your
application
 (F10, F11 or Toolbar buttons)
 Run to a specific location
 Run To Cursor (right-click menu)
Situations under which breakpoints
are not feasible
 Timing sensitive issues
 Breakpoint triggers too often
 Live Debug not possible
 Debugging production systems
Debug Vs Release Build
 Debug:
The Debug configuration of your program is compiled with full symbolic debug information and no
optimization. Optimization complicates debugging, because the relationship between source code and
generated instructions is more complex.
 Release:
The Release configuration of your program contains no symbolic debug information and is fully
optimized. Debug information can be generated in PDB Files, depending on the compiler options that are
used. Creating PDB files can be very useful if you later have to debug your release version.
Condition on Debug
 Using If Block:
 Using Attribute:
#if DEBUG
public void SetPrivateValue(int value)
{
...
...
}
#endif
[System.Diagnostics.Conditional("DEBUG")]
public void SetPrivateValue(int value)
{
...
...
...
}
[System.Diagnostics.Conditional("DEBUG")] public void SetPrivateValue(int value) { ... }
#if DEBUG public void SetPrivateValue(int value) { ... } #endif
Condition on Debug
Using If Block:
 The code in here won't even reach the IL on release.
 So can’t verify syntax (compile time issues)
Using Attribute:
 Code will be translated to IL, but will not execute
 Good to avoid typos/syntax errors
Just-In-Time Debugging
 Just-In-Time debugging launches Visual Studio automatically when an exception or crash
occurs in an application running outside Visual Studio.
 This enables you to test your application when Visual Studio is not running and begin
debugging with Visual Studio when a problem occurs.
 See Details: http://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx
What’s New?
Browser Stack
 http://www.infoq.com/presentations/BrowserStack
 http://www.hanselman.com/blog/CrossBrowserDebuggingIntegratedIntoVisualStudioWithBro
wserStack.aspx
 Firebug and Fiedler?

More Related Content

What's hot

Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6helpido9
 
Basic Flowcharting
Basic FlowchartingBasic Flowcharting
Basic Flowcharting
sebrown
 
VivaMP, system of detecting errors in the code of parallel C++ programs using...
VivaMP, system of detecting errors in the code of parallel C++ programs using...VivaMP, system of detecting errors in the code of parallel C++ programs using...
VivaMP, system of detecting errors in the code of parallel C++ programs using...
PVS-Studio
 
Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6
solutionjug4
 
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision tableProgramming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Anjali Technosoft
 
Interactive debugging system
Interactive debugging systemInteractive debugging system
Interactive debugging system
Florence priyadarshini
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
hamza javed
 
Software develop....
Software develop.... Software develop....
Software develop....
GCWUS
 
Grade 10 flowcharting
Grade 10  flowchartingGrade 10  flowcharting
Grade 10 flowcharting
Rafael Balderosa
 
What's the Difference Between Static Analysis and Compiler Warnings?
What's the Difference Between Static Analysis and Compiler Warnings?What's the Difference Between Static Analysis and Compiler Warnings?
What's the Difference Between Static Analysis and Compiler Warnings?
Andrey Karpov
 
Module-4_WTA_PHP Class & Error Handling
Module-4_WTA_PHP Class & Error HandlingModule-4_WTA_PHP Class & Error Handling
Module-4_WTA_PHP Class & Error Handling
SIVAKUMAR V
 
Algorithm and Flowcharts
Algorithm and FlowchartsAlgorithm and Flowcharts
Algorithm and Flowcharts
Sabik T S
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
Rabin BK
 
Software Quality Engineering
Software Quality EngineeringSoftware Quality Engineering
Software Quality Engineering
Hafiz Muhammad Ahmad Naeem
 
High productivity development with Eclipse and Java 8
High productivity development with Eclipse and Java 8High productivity development with Eclipse and Java 8
High productivity development with Eclipse and Java 8
Noopur Gupta
 
Algorithm & flowchart
Algorithm & flowchartAlgorithm & flowchart
Algorithm & flowchart
saurabh sen sky
 
Flowcharts and algorithms
Flowcharts and algorithmsFlowcharts and algorithms
Flowcharts and algorithms
Student
 

What's hot (18)

Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6
 
Basic Flowcharting
Basic FlowchartingBasic Flowcharting
Basic Flowcharting
 
VivaMP, system of detecting errors in the code of parallel C++ programs using...
VivaMP, system of detecting errors in the code of parallel C++ programs using...VivaMP, system of detecting errors in the code of parallel C++ programs using...
VivaMP, system of detecting errors in the code of parallel C++ programs using...
 
Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6Cis 355 i lab 1 of 6
Cis 355 i lab 1 of 6
 
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision tableProgramming aids- Algorithm, Flowchart, Pseudocodes and Decision table
Programming aids- Algorithm, Flowchart, Pseudocodes and Decision table
 
Quiz5
Quiz5Quiz5
Quiz5
 
Interactive debugging system
Interactive debugging systemInteractive debugging system
Interactive debugging system
 
Algorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo codeAlgorithm and flowchart with pseudo code
Algorithm and flowchart with pseudo code
 
Software develop....
Software develop.... Software develop....
Software develop....
 
Grade 10 flowcharting
Grade 10  flowchartingGrade 10  flowcharting
Grade 10 flowcharting
 
What's the Difference Between Static Analysis and Compiler Warnings?
What's the Difference Between Static Analysis and Compiler Warnings?What's the Difference Between Static Analysis and Compiler Warnings?
What's the Difference Between Static Analysis and Compiler Warnings?
 
Module-4_WTA_PHP Class & Error Handling
Module-4_WTA_PHP Class & Error HandlingModule-4_WTA_PHP Class & Error Handling
Module-4_WTA_PHP Class & Error Handling
 
Algorithm and Flowcharts
Algorithm and FlowchartsAlgorithm and Flowcharts
Algorithm and Flowcharts
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Software Quality Engineering
Software Quality EngineeringSoftware Quality Engineering
Software Quality Engineering
 
High productivity development with Eclipse and Java 8
High productivity development with Eclipse and Java 8High productivity development with Eclipse and Java 8
High productivity development with Eclipse and Java 8
 
Algorithm & flowchart
Algorithm & flowchartAlgorithm & flowchart
Algorithm & flowchart
 
Flowcharts and algorithms
Flowcharts and algorithmsFlowcharts and algorithms
Flowcharts and algorithms
 

Viewers also liked

C sharp chap5
C sharp chap5C sharp chap5
C sharp chap5
Mukesh Tekwani
 
Vb.net session 12
Vb.net session 12Vb.net session 12
Vb.net session 12Niit Care
 
Exception handling in asp.net
Exception handling in asp.netException handling in asp.net
Exception handling in asp.net
Neelesh Shukla
 
Chapter 3: ado.net
Chapter 3: ado.netChapter 3: ado.net
Chapter 3: ado.net
Ngeam Soly
 
Exception Handling Mechanism in .NET CLR
Exception Handling Mechanism in .NET CLRException Handling Mechanism in .NET CLR
Exception Handling Mechanism in .NET CLRKiran Munir
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
Vishwa Mohan
 
Ado.net
Ado.netAdo.net
Ado.net
dina1985vlr
 
EVALUATION OF PROCESSES PARAMETER AND MECHANICAL PROPERTIES IN FRICTION STIR ...
EVALUATION OF PROCESSES PARAMETER AND MECHANICAL PROPERTIES IN FRICTION STIR ...EVALUATION OF PROCESSES PARAMETER AND MECHANICAL PROPERTIES IN FRICTION STIR ...
EVALUATION OF PROCESSES PARAMETER AND MECHANICAL PROPERTIES IN FRICTION STIR ...
IAEME Publication
 
For Beginers - ADO.Net
For Beginers - ADO.NetFor Beginers - ADO.Net
For Beginers - ADO.Net
Snehal Harawande
 
Data Structure In C#
Data Structure In C#Data Structure In C#
Data Structure In C#
Shahzad
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)pbarasia
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programmingRoger Argarin
 
PPT on break even analysis
PPT on break even analysisPPT on break even analysis
PPT on break even analysisITC Limited
 
Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0Salim M
 

Viewers also liked (17)

C sharp chap5
C sharp chap5C sharp chap5
C sharp chap5
 
Vb.net session 12
Vb.net session 12Vb.net session 12
Vb.net session 12
 
Exception handling in asp.net
Exception handling in asp.netException handling in asp.net
Exception handling in asp.net
 
Chapter 3: ado.net
Chapter 3: ado.netChapter 3: ado.net
Chapter 3: ado.net
 
Exception Handling Mechanism in .NET CLR
Exception Handling Mechanism in .NET CLRException Handling Mechanism in .NET CLR
Exception Handling Mechanism in .NET CLR
 
Ado.net
Ado.netAdo.net
Ado.net
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
 
Ado.net
Ado.netAdo.net
Ado.net
 
EVALUATION OF PROCESSES PARAMETER AND MECHANICAL PROPERTIES IN FRICTION STIR ...
EVALUATION OF PROCESSES PARAMETER AND MECHANICAL PROPERTIES IN FRICTION STIR ...EVALUATION OF PROCESSES PARAMETER AND MECHANICAL PROPERTIES IN FRICTION STIR ...
EVALUATION OF PROCESSES PARAMETER AND MECHANICAL PROPERTIES IN FRICTION STIR ...
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 
For Beginers - ADO.Net
For Beginers - ADO.NetFor Beginers - ADO.Net
For Beginers - ADO.Net
 
Programming in c#
Programming in c#Programming in c#
Programming in c#
 
Data Structure In C#
Data Structure In C#Data Structure In C#
Data Structure In C#
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programming
 
PPT on break even analysis
PPT on break even analysisPPT on break even analysis
PPT on break even analysis
 
Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0Basic controls of Visual Basic 6.0
Basic controls of Visual Basic 6.0
 

Similar to Debugging in .Net

.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
Bala Subra
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
Bala Subra
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmer
LeylimYaln
 
debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).ppt
jerlinS1
 
An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...
jeyasrig
 
How to debugging
How to debuggingHow to debugging
How to debuggingSiya Lee
 
Production Debugging at Code Camp Philly
Production Debugging at Code Camp PhillyProduction Debugging at Code Camp Philly
Production Debugging at Code Camp Philly
Brian Lyttle
 
UNIT 3.1 INTRODUCTON TO IDA.ppt
UNIT 3.1 INTRODUCTON TO IDA.pptUNIT 3.1 INTRODUCTON TO IDA.ppt
UNIT 3.1 INTRODUCTON TO IDA.ppt
ManjuAppukuttan2
 
ID E's features
ID E's featuresID E's features
ID E's features
wajahat Gul
 
Reverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentalsReverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentals
Eran Goldstein
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made Easy
Alon Fliess
 
Different Techniques Of Debugging Selenium Based Test Scripts.pdf
Different Techniques Of Debugging Selenium Based Test Scripts.pdfDifferent Techniques Of Debugging Selenium Based Test Scripts.pdf
Different Techniques Of Debugging Selenium Based Test Scripts.pdf
pCloudy
 
TSC Summit #3 - Reverse engineering and anti debugging techniques
TSC Summit #3 - Reverse engineering and anti debugging techniquesTSC Summit #3 - Reverse engineering and anti debugging techniques
TSC Summit #3 - Reverse engineering and anti debugging techniques
Mikal Villa
 
Compilers programmingembedded
Compilers programmingembeddedCompilers programmingembedded
Compilers programmingembedded
Manish Pandey
 
Types of errors 2019
Types of errors 2019Types of errors 2019
Types of errors 2019
Osama Ghandour Geris
 
6-Error Handling.pptx
6-Error Handling.pptx6-Error Handling.pptx
6-Error Handling.pptx
amiralicomsats3
 
Qualidade de Software em zOS usando IBM Debug Tool e RDz
Qualidade de Software em zOS usando IBM Debug Tool e RDzQualidade de Software em zOS usando IBM Debug Tool e RDz
Qualidade de Software em zOS usando IBM Debug Tool e RDz
Paulo Batuta
 
Reversing and Patching Machine Code
Reversing and Patching Machine CodeReversing and Patching Machine Code
Reversing and Patching Machine Code
Teodoro Cipresso
 

Similar to Debugging in .Net (20)

.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmer
 
debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).ppt
 
An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...
 
Intro To AOP
Intro To AOPIntro To AOP
Intro To AOP
 
How to debugging
How to debuggingHow to debugging
How to debugging
 
Production Debugging at Code Camp Philly
Production Debugging at Code Camp PhillyProduction Debugging at Code Camp Philly
Production Debugging at Code Camp Philly
 
UNIT 3.1 INTRODUCTON TO IDA.ppt
UNIT 3.1 INTRODUCTON TO IDA.pptUNIT 3.1 INTRODUCTON TO IDA.ppt
UNIT 3.1 INTRODUCTON TO IDA.ppt
 
ID E's features
ID E's featuresID E's features
ID E's features
 
Reverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentalsReverse engineering – debugging fundamentals
Reverse engineering – debugging fundamentals
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made Easy
 
Different Techniques Of Debugging Selenium Based Test Scripts.pdf
Different Techniques Of Debugging Selenium Based Test Scripts.pdfDifferent Techniques Of Debugging Selenium Based Test Scripts.pdf
Different Techniques Of Debugging Selenium Based Test Scripts.pdf
 
TSC Summit #3 - Reverse engineering and anti debugging techniques
TSC Summit #3 - Reverse engineering and anti debugging techniquesTSC Summit #3 - Reverse engineering and anti debugging techniques
TSC Summit #3 - Reverse engineering and anti debugging techniques
 
Compilers programmingembedded
Compilers programmingembeddedCompilers programmingembedded
Compilers programmingembedded
 
Types of errors 2019
Types of errors 2019Types of errors 2019
Types of errors 2019
 
Intro1
Intro1Intro1
Intro1
 
6-Error Handling.pptx
6-Error Handling.pptx6-Error Handling.pptx
6-Error Handling.pptx
 
Qualidade de Software em zOS usando IBM Debug Tool e RDz
Qualidade de Software em zOS usando IBM Debug Tool e RDzQualidade de Software em zOS usando IBM Debug Tool e RDz
Qualidade de Software em zOS usando IBM Debug Tool e RDz
 
Reversing and Patching Machine Code
Reversing and Patching Machine CodeReversing and Patching Machine Code
Reversing and Patching Machine Code
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 

Debugging in .Net

  • 2. Software Bugs r Expensive Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. Brian Kernighan
  • 3. Getting Started!  Debugging Basics: http://msdn.microsoft.com/en-us/library/aa290881%28v=vs.71%29.aspx
  • 4. Debugging Basics What are you trying to find and fix? ◦ Two main types of code errors ◦ Syntax: Compiler catches most if not all of these for you. ◦ Semantic or logical: Syntactically correct yet program may “crash and burn” at run-time!  Autos  Locals  Watch  Call Stack  Command Window  QuickWatch Dialog  Breakpoints window  Threads  Modules  Processes  Memory  Disassembly  Registers Debugging Tools for Inspection Your Program
  • 5. Execution Control: Breakpoints Stepping through your code  Starting / Stopping  Breaking  Stepping through your application  (F10, F11 or Toolbar buttons)  Run to a specific location  Run To Cursor (right-click menu) Situations under which breakpoints are not feasible  Timing sensitive issues  Breakpoint triggers too often  Live Debug not possible  Debugging production systems
  • 6. Debug Vs Release Build  Debug: The Debug configuration of your program is compiled with full symbolic debug information and no optimization. Optimization complicates debugging, because the relationship between source code and generated instructions is more complex.  Release: The Release configuration of your program contains no symbolic debug information and is fully optimized. Debug information can be generated in PDB Files, depending on the compiler options that are used. Creating PDB files can be very useful if you later have to debug your release version.
  • 7. Condition on Debug  Using If Block:  Using Attribute: #if DEBUG public void SetPrivateValue(int value) { ... ... } #endif [System.Diagnostics.Conditional("DEBUG")] public void SetPrivateValue(int value) { ... ... ... } [System.Diagnostics.Conditional("DEBUG")] public void SetPrivateValue(int value) { ... } #if DEBUG public void SetPrivateValue(int value) { ... } #endif
  • 8. Condition on Debug Using If Block:  The code in here won't even reach the IL on release.  So can’t verify syntax (compile time issues) Using Attribute:  Code will be translated to IL, but will not execute  Good to avoid typos/syntax errors
  • 9. Just-In-Time Debugging  Just-In-Time debugging launches Visual Studio automatically when an exception or crash occurs in an application running outside Visual Studio.  This enables you to test your application when Visual Studio is not running and begin debugging with Visual Studio when a problem occurs.  See Details: http://msdn.microsoft.com/en-us/library/5hs4b7a6.aspx
  • 10. What’s New? Browser Stack  http://www.infoq.com/presentations/BrowserStack  http://www.hanselman.com/blog/CrossBrowserDebuggingIntegratedIntoVisualStudioWithBro wserStack.aspx  Firebug and Fiedler?