SlideShare una empresa de Scribd logo
1 de 25
Descargar para leer sin conexión
You Will Haz Crazy Code!
Super-Charged Debugging for the New Developer
why are we here?
● Developers spend a *lot* of time debugging
code.
● You're a developer interested in pushing
your debugging skills beyond simple
breakpoints.
● As the projects you work on grow in size and
complexity, you will likely want some
additional tools at the ready for when
breakpoints prove totally, completely and in
all other ways wholly inadequate.
who's the geek up front?
● Software/web developer at Bridgepoint
Education, rocking primarily with ASP.NET
MVC 4, SQL Server 2008, C#, Java,
Javascript, Unity.
● jon_bachelor@me.com
● www.jonbachelor.com
● @DigiPug
● speakerrate.com/digipug
● slideshare.net/digipug
● (this will all be at the end too!)
he's doing it wrong
totally doing it right... but might be drunk
the good news
There are enough debugging tools, tips, tricks
and techniques to make this into a semester-
length course, rather than a 1 hour talk.
the bad news
There are enough debugging tools, tips, tricks
and techniques to make this into a semester-
length course, rather than a 1 hour talk.
meet the tip of the iceberg
● Breakpoints
● Tracepoints
● Homemade debug
snippets
● Conditional
breakpoints
● Breakpoint filters
● Fiddler
● AOP with
PostSharp
● MOQ
● 'FileWatcher'
● Intellitrace
● LINQPad
● Snoop
● Debug converters
● sqlcmd
● VS exception
settings
● so... much... more...
the mighty breakpoint
f9, f10, ctrl-f10, f11, shift-f11
Use function keys to speed up your debugging
efforts:
● f9: Sets a breakpoint at your cursor
● f10: Step over (not INTO code)
● ctrl-f10: Run to cursor
● f11: Step in
● shift-f11: Step out
● f5: giddy up!
hit it!
when hit... make me a tracepoint!
demo
super-charging your breakpoints:
tracepoints
hit count
conditional breakpoints
labeled breakpoints
tracepoints == cool;
● Allows you to get a ton of information about
your execution flow, arguments and/or
variables, etc, very quickly.
● Prevents trouble you may otherwise run into
with timing issues caused by using
breakpoints (like when debugging threading
problems).
murphy's tip
the "fun" issues always seem to happen in production...
where tracepoints are not an option.
NOW WHAT???
logging == super-cool;
● Tracepoints are really just a means to set up
really quick logging statements.
● Take the time to implement good logging... If
your logs don't capture a problem, they're
useless. If your logs capture so much
information that your app slows to a crawl,
they're worse than useless.
● Two popular tools to make logging easier:
○ PostSharp AOP
○ Log4Net
remote debugging
an extraordinarily powerful tool that so few take the
time to learn how to set up!
it's easier than it sounds
● Remote debugging is particularly useful for
troubleshooting an issue occurring on your
development webserver which you cannot
replicate on your local machine
● Fairly easy to setup if both you and your
webserver are on the same domain
● Run the "remote debugging monitor" on the
server
● Your DLLs and PDB files must match exactly
● Attach to process: w3wp.exe
● Enjoy rockstar status!
what about the data??
sometimes a crazy-funky problem you're facing is
being triggered by a bad state of your database
an ounce of prevention...
● At some point, your database will
presumably be in a known good state. Make
a backup at that time.
● Restore to that backup if things go wrong.
● Make backups of known bad states to
troubleshoot issues... Or play pranks on team
members.
ssms not installed... ruh-roh!
● sqlcmd to the rescue!
● Command line utility to run quick queries to
check on potential data issues.
● Also super useful for creating batch scripts to
run collections of SQL scripts.
databases can be complex!
● Use database diagrams in SSMS to get your
mind wrapped around a database, or even
just a portion of a database.
warning: small font ahead!
What follows is a list of resources to help you
dig into a bunch of the tools covered or
mentioned today...
I would suggest grabbing this deck from
slideshare.net/digipug, but do what ya gotta
do...
i'm hooked... i want more!
Visual Studio Debugging from MSDN (general info from Microsoft):
http://bit.ly/18LdVBk
PostSharp AOP (logging and TONS more):
http://www.postsharp.net/purchase
Snoop (WPF debug assistant):
http://snoopwpf.codeplex.com/
Fiddler (web debug assistant):
http://fiddler2.com/
WPF debug converter & more (techniques):
http://bit.ly/16deQqe
Favorite Documents Extension (keeping track of classes related to a particular issue or feature):
http://bit.ly/12VMRav
Agent Ransack (kick-butt search tool):
http://www.mythicsoft.com/agentransack
Remote Debugging (you'll be a star when you set this up!):
http://bit.ly/1ceBqlb
Using Labels in TFS:
http://bit.ly/17NkCOG
sqlcmd:
http://bit.ly/15ptd9U
thanks so much for coming!
● e: jon_bachelor@me.com
● t: @DigiPug
● w: www.jonbachelor.com
● speakerrate.com/digipug
● slideshare.net/digipug

Más contenido relacionado

La actualidad más candente

Blend it up - leancamp london presentation
Blend it up - leancamp london presentationBlend it up - leancamp london presentation
Blend it up - leancamp london presentationAntonio Terreno
 
How To Pass A Ruby Code Test
How To Pass A Ruby Code TestHow To Pass A Ruby Code Test
How To Pass A Ruby Code TestRobert Postill
 
Poing: a coder’s take on protein modelling
Poing: a coder’s take on protein modellingPoing: a coder’s take on protein modelling
Poing: a coder’s take on protein modellingBiogeeks
 
EuroSTAR Webinar - Mob testing
EuroSTAR Webinar - Mob testingEuroSTAR Webinar - Mob testing
EuroSTAR Webinar - Mob testingMaaret Pyhäjärvi
 
[부스트캠프 Tech Talk] 고지형_내 자식 하나쯤은 있어야죠
[부스트캠프 Tech Talk] 고지형_내 자식 하나쯤은 있어야죠[부스트캠프 Tech Talk] 고지형_내 자식 하나쯤은 있어야죠
[부스트캠프 Tech Talk] 고지형_내 자식 하나쯤은 있어야죠CONNECT FOUNDATION
 
5 best practices for (web/ software) development (2010)
5 best practices for (web/ software) development (2010)5 best practices for (web/ software) development (2010)
5 best practices for (web/ software) development (2010)Erwin Elling
 

La actualidad más candente (11)

Blend it up - leancamp london presentation
Blend it up - leancamp london presentationBlend it up - leancamp london presentation
Blend it up - leancamp london presentation
 
NoSQL
NoSQLNoSQL
NoSQL
 
Reflections on SCM
Reflections on SCMReflections on SCM
Reflections on SCM
 
Etwas mit Leap
Etwas mit LeapEtwas mit Leap
Etwas mit Leap
 
How To Pass A Ruby Code Test
How To Pass A Ruby Code TestHow To Pass A Ruby Code Test
How To Pass A Ruby Code Test
 
Poing: a coder’s take on protein modelling
Poing: a coder’s take on protein modellingPoing: a coder’s take on protein modelling
Poing: a coder’s take on protein modelling
 
Tasting Your First Test Burger
Tasting Your First Test BurgerTasting Your First Test Burger
Tasting Your First Test Burger
 
EuroSTAR Webinar - Mob testing
EuroSTAR Webinar - Mob testingEuroSTAR Webinar - Mob testing
EuroSTAR Webinar - Mob testing
 
[부스트캠프 Tech Talk] 고지형_내 자식 하나쯤은 있어야죠
[부스트캠프 Tech Talk] 고지형_내 자식 하나쯤은 있어야죠[부스트캠프 Tech Talk] 고지형_내 자식 하나쯤은 있어야죠
[부스트캠프 Tech Talk] 고지형_내 자식 하나쯤은 있어야죠
 
AgileTD Scandia: Mob Testing
AgileTD Scandia: Mob TestingAgileTD Scandia: Mob Testing
AgileTD Scandia: Mob Testing
 
5 best practices for (web/ software) development (2010)
5 best practices for (web/ software) development (2010)5 best practices for (web/ software) development (2010)
5 best practices for (web/ software) development (2010)
 

Destacado

The bright spark_within_us_all_-_mini v4
The bright spark_within_us_all_-_mini v4The bright spark_within_us_all_-_mini v4
The bright spark_within_us_all_-_mini v4James Williams
 
Eegg437 assigment 1 osman şimşek 286046 comp eng
Eegg437 assigment 1 osman şimşek 286046 comp engEegg437 assigment 1 osman şimşek 286046 comp eng
Eegg437 assigment 1 osman şimşek 286046 comp engosman_71
 
تكنولوجيا الحاسوب والعملية التعليمية
تكنولوجيا الحاسوب والعملية التعليميةتكنولوجيا الحاسوب والعملية التعليمية
تكنولوجيا الحاسوب والعملية التعليميةمسقط
 
Don't Diligence Information Security for Lawyers
Don't Diligence Information Security for LawyersDon't Diligence Information Security for Lawyers
Don't Diligence Information Security for Lawyersdarrentthurston
 
Osman assigmet 2 the business idea
Osman assigmet 2 the  business ideaOsman assigmet 2 the  business idea
Osman assigmet 2 the business ideaosman_71
 
semiología auditiva
semiología auditivasemiología auditiva
semiología auditivaCarol Quiroga
 
Grade 10 Science Module (1st Quarter)
Grade 10 Science Module (1st Quarter)Grade 10 Science Module (1st Quarter)
Grade 10 Science Module (1st Quarter)Luwen Borigas
 
Kad jemputan majlis aryan
Kad jemputan majlis aryanKad jemputan majlis aryan
Kad jemputan majlis aryanPiya Sabawi
 
Grade 10 English Module (1st Quarter)
Grade 10 English Module (1st Quarter)Grade 10 English Module (1st Quarter)
Grade 10 English Module (1st Quarter)Luwen Borigas
 
Grade 10 Math Module (1st Quarter)
Grade 10 Math Module (1st Quarter)Grade 10 Math Module (1st Quarter)
Grade 10 Math Module (1st Quarter)Luwen Borigas
 
Grade 10 Filipino Module (1st Quarter)
Grade 10 Filipino Module (1st Quarter)Grade 10 Filipino Module (1st Quarter)
Grade 10 Filipino Module (1st Quarter)Luwen Borigas
 
الوسائط المتعددة في التربية
 الوسائط المتعددة في التربية الوسائط المتعددة في التربية
الوسائط المتعددة في التربيةمسقط
 
الوسائط المتعددة في التربية 2
الوسائط المتعددة في التربية 2الوسائط المتعددة في التربية 2
الوسائط المتعددة في التربية 2مسقط
 
Bahasa melayu tahun 1.ppt
Bahasa melayu tahun 1.pptBahasa melayu tahun 1.ppt
Bahasa melayu tahun 1.pptPiya Sabawi
 
Seismic waves (Grade 10)
Seismic waves (Grade 10)Seismic waves (Grade 10)
Seismic waves (Grade 10)Luwen Borigas
 

Destacado (17)

02 introductioncensus
02 introductioncensus02 introductioncensus
02 introductioncensus
 
Justforudear
JustforudearJustforudear
Justforudear
 
The bright spark_within_us_all_-_mini v4
The bright spark_within_us_all_-_mini v4The bright spark_within_us_all_-_mini v4
The bright spark_within_us_all_-_mini v4
 
Eegg437 assigment 1 osman şimşek 286046 comp eng
Eegg437 assigment 1 osman şimşek 286046 comp engEegg437 assigment 1 osman şimşek 286046 comp eng
Eegg437 assigment 1 osman şimşek 286046 comp eng
 
تكنولوجيا الحاسوب والعملية التعليمية
تكنولوجيا الحاسوب والعملية التعليميةتكنولوجيا الحاسوب والعملية التعليمية
تكنولوجيا الحاسوب والعملية التعليمية
 
Don't Diligence Information Security for Lawyers
Don't Diligence Information Security for LawyersDon't Diligence Information Security for Lawyers
Don't Diligence Information Security for Lawyers
 
Osman assigmet 2 the business idea
Osman assigmet 2 the  business ideaOsman assigmet 2 the  business idea
Osman assigmet 2 the business idea
 
semiología auditiva
semiología auditivasemiología auditiva
semiología auditiva
 
Grade 10 Science Module (1st Quarter)
Grade 10 Science Module (1st Quarter)Grade 10 Science Module (1st Quarter)
Grade 10 Science Module (1st Quarter)
 
Kad jemputan majlis aryan
Kad jemputan majlis aryanKad jemputan majlis aryan
Kad jemputan majlis aryan
 
Grade 10 English Module (1st Quarter)
Grade 10 English Module (1st Quarter)Grade 10 English Module (1st Quarter)
Grade 10 English Module (1st Quarter)
 
Grade 10 Math Module (1st Quarter)
Grade 10 Math Module (1st Quarter)Grade 10 Math Module (1st Quarter)
Grade 10 Math Module (1st Quarter)
 
Grade 10 Filipino Module (1st Quarter)
Grade 10 Filipino Module (1st Quarter)Grade 10 Filipino Module (1st Quarter)
Grade 10 Filipino Module (1st Quarter)
 
الوسائط المتعددة في التربية
 الوسائط المتعددة في التربية الوسائط المتعددة في التربية
الوسائط المتعددة في التربية
 
الوسائط المتعددة في التربية 2
الوسائط المتعددة في التربية 2الوسائط المتعددة في التربية 2
الوسائط المتعددة في التربية 2
 
Bahasa melayu tahun 1.ppt
Bahasa melayu tahun 1.pptBahasa melayu tahun 1.ppt
Bahasa melayu tahun 1.ppt
 
Seismic waves (Grade 10)
Seismic waves (Grade 10)Seismic waves (Grade 10)
Seismic waves (Grade 10)
 

Similar a Spaghetti gate

The Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidThe Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidStanojko Markovik
 
Services, tools & practices for a software house
Services, tools & practices for a software houseServices, tools & practices for a software house
Services, tools & practices for a software houseParis Apostolopoulos
 
Debugging PySpark - Spark Summit East 2017
Debugging PySpark - Spark Summit East 2017Debugging PySpark - Spark Summit East 2017
Debugging PySpark - Spark Summit East 2017Holden Karau
 
Debugging PySpark: Spark Summit East talk by Holden Karau
Debugging PySpark: Spark Summit East talk by Holden KarauDebugging PySpark: Spark Summit East talk by Holden Karau
Debugging PySpark: Spark Summit East talk by Holden KarauSpark Summit
 
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff  - Mykel Alvis at Puppet Camp AltantaDon't Suck at Building Stuff  - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp AltantaPuppet
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Acquia
 
Postmortem of a uwp xaml application development
Postmortem of a uwp xaml application developmentPostmortem of a uwp xaml application development
Postmortem of a uwp xaml application developmentDavid Catuhe
 
Vulnerability, exploit to metasploit
Vulnerability, exploit to metasploitVulnerability, exploit to metasploit
Vulnerability, exploit to metasploitTiago Henriques
 
Game Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance OptimizationGame Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance OptimizationNick Pruehs
 
How to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringHow to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringAndrew Kirkpatrick
 
10 tips to save you time and frustration while programming
10 tips to save you time and frustration while programming10 tips to save you time and frustration while programming
10 tips to save you time and frustration while programmingHugo Shi
 
Scaling the synchronous web - Elaine Wherry
Scaling the synchronous web - Elaine WherryScaling the synchronous web - Elaine Wherry
Scaling the synchronous web - Elaine WherryCarsonified Team
 
Sensepost assessment automation
Sensepost assessment automationSensepost assessment automation
Sensepost assessment automationSensePost
 
Software Development Whats & Whys
Software Development Whats & Whys Software Development Whats & Whys
Software Development Whats & Whys Harun Yardımcı
 
Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014Alan Richardson
 

Similar a Spaghetti gate (20)

PHP - Introduction to PHP Bugs - Debugging
PHP -  Introduction to  PHP Bugs - DebuggingPHP -  Introduction to  PHP Bugs - Debugging
PHP - Introduction to PHP Bugs - Debugging
 
The Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with androidThe Good, the Bad and the Ugly things to do with android
The Good, the Bad and the Ugly things to do with android
 
Services, tools & practices for a software house
Services, tools & practices for a software houseServices, tools & practices for a software house
Services, tools & practices for a software house
 
Debugging PySpark - Spark Summit East 2017
Debugging PySpark - Spark Summit East 2017Debugging PySpark - Spark Summit East 2017
Debugging PySpark - Spark Summit East 2017
 
Debugging PySpark: Spark Summit East talk by Holden Karau
Debugging PySpark: Spark Summit East talk by Holden KarauDebugging PySpark: Spark Summit East talk by Holden Karau
Debugging PySpark: Spark Summit East talk by Holden Karau
 
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff  - Mykel Alvis at Puppet Camp AltantaDon't Suck at Building Stuff  - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
 
Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)Become a Better Developer with Debugging Techniques for Drupal (and more!)
Become a Better Developer with Debugging Techniques for Drupal (and more!)
 
Postmortem of a uwp xaml application development
Postmortem of a uwp xaml application developmentPostmortem of a uwp xaml application development
Postmortem of a uwp xaml application development
 
Vulnerability, exploit to metasploit
Vulnerability, exploit to metasploitVulnerability, exploit to metasploit
Vulnerability, exploit to metasploit
 
12 tricks to avoid hackers breaks your CI / CD
12 tricks to avoid hackers breaks your  CI / CD12 tricks to avoid hackers breaks your  CI / CD
12 tricks to avoid hackers breaks your CI / CD
 
Bug Hunting Safari
Bug Hunting SafariBug Hunting Safari
Bug Hunting Safari
 
Game Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance OptimizationGame Programming 13 - Debugging & Performance Optimization
Game Programming 13 - Debugging & Performance Optimization
 
How to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringHow to get started with Site Reliability Engineering
How to get started with Site Reliability Engineering
 
Getting It Done
Getting It DoneGetting It Done
Getting It Done
 
10 tips to save you time and frustration while programming
10 tips to save you time and frustration while programming10 tips to save you time and frustration while programming
10 tips to save you time and frustration while programming
 
Scaling the synchronous web - Elaine Wherry
Scaling the synchronous web - Elaine WherryScaling the synchronous web - Elaine Wherry
Scaling the synchronous web - Elaine Wherry
 
Sensepost assessment automation
Sensepost assessment automationSensepost assessment automation
Sensepost assessment automation
 
Software Development Whats & Whys
Software Development Whats & Whys Software Development Whats & Whys
Software Development Whats & Whys
 
Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014
 
Code Forensics
Code ForensicsCode Forensics
Code Forensics
 

Último

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

Spaghetti gate

  • 1. You Will Haz Crazy Code! Super-Charged Debugging for the New Developer
  • 2. why are we here? ● Developers spend a *lot* of time debugging code. ● You're a developer interested in pushing your debugging skills beyond simple breakpoints. ● As the projects you work on grow in size and complexity, you will likely want some additional tools at the ready for when breakpoints prove totally, completely and in all other ways wholly inadequate.
  • 3. who's the geek up front? ● Software/web developer at Bridgepoint Education, rocking primarily with ASP.NET MVC 4, SQL Server 2008, C#, Java, Javascript, Unity. ● jon_bachelor@me.com ● www.jonbachelor.com ● @DigiPug ● speakerrate.com/digipug ● slideshare.net/digipug ● (this will all be at the end too!)
  • 5. totally doing it right... but might be drunk
  • 6. the good news There are enough debugging tools, tips, tricks and techniques to make this into a semester- length course, rather than a 1 hour talk.
  • 7. the bad news There are enough debugging tools, tips, tricks and techniques to make this into a semester- length course, rather than a 1 hour talk.
  • 8. meet the tip of the iceberg ● Breakpoints ● Tracepoints ● Homemade debug snippets ● Conditional breakpoints ● Breakpoint filters ● Fiddler ● AOP with PostSharp ● MOQ ● 'FileWatcher' ● Intellitrace ● LINQPad ● Snoop ● Debug converters ● sqlcmd ● VS exception settings ● so... much... more...
  • 10. f9, f10, ctrl-f10, f11, shift-f11 Use function keys to speed up your debugging efforts: ● f9: Sets a breakpoint at your cursor ● f10: Step over (not INTO code) ● ctrl-f10: Run to cursor ● f11: Step in ● shift-f11: Step out ● f5: giddy up!
  • 12. when hit... make me a tracepoint!
  • 13. demo super-charging your breakpoints: tracepoints hit count conditional breakpoints labeled breakpoints
  • 14. tracepoints == cool; ● Allows you to get a ton of information about your execution flow, arguments and/or variables, etc, very quickly. ● Prevents trouble you may otherwise run into with timing issues caused by using breakpoints (like when debugging threading problems).
  • 15. murphy's tip the "fun" issues always seem to happen in production... where tracepoints are not an option. NOW WHAT???
  • 16. logging == super-cool; ● Tracepoints are really just a means to set up really quick logging statements. ● Take the time to implement good logging... If your logs don't capture a problem, they're useless. If your logs capture so much information that your app slows to a crawl, they're worse than useless. ● Two popular tools to make logging easier: ○ PostSharp AOP ○ Log4Net
  • 17. remote debugging an extraordinarily powerful tool that so few take the time to learn how to set up!
  • 18. it's easier than it sounds ● Remote debugging is particularly useful for troubleshooting an issue occurring on your development webserver which you cannot replicate on your local machine ● Fairly easy to setup if both you and your webserver are on the same domain ● Run the "remote debugging monitor" on the server ● Your DLLs and PDB files must match exactly ● Attach to process: w3wp.exe ● Enjoy rockstar status!
  • 19. what about the data?? sometimes a crazy-funky problem you're facing is being triggered by a bad state of your database
  • 20. an ounce of prevention... ● At some point, your database will presumably be in a known good state. Make a backup at that time. ● Restore to that backup if things go wrong. ● Make backups of known bad states to troubleshoot issues... Or play pranks on team members.
  • 21. ssms not installed... ruh-roh! ● sqlcmd to the rescue! ● Command line utility to run quick queries to check on potential data issues. ● Also super useful for creating batch scripts to run collections of SQL scripts.
  • 22. databases can be complex! ● Use database diagrams in SSMS to get your mind wrapped around a database, or even just a portion of a database.
  • 23. warning: small font ahead! What follows is a list of resources to help you dig into a bunch of the tools covered or mentioned today... I would suggest grabbing this deck from slideshare.net/digipug, but do what ya gotta do...
  • 24. i'm hooked... i want more! Visual Studio Debugging from MSDN (general info from Microsoft): http://bit.ly/18LdVBk PostSharp AOP (logging and TONS more): http://www.postsharp.net/purchase Snoop (WPF debug assistant): http://snoopwpf.codeplex.com/ Fiddler (web debug assistant): http://fiddler2.com/ WPF debug converter & more (techniques): http://bit.ly/16deQqe Favorite Documents Extension (keeping track of classes related to a particular issue or feature): http://bit.ly/12VMRav Agent Ransack (kick-butt search tool): http://www.mythicsoft.com/agentransack Remote Debugging (you'll be a star when you set this up!): http://bit.ly/1ceBqlb Using Labels in TFS: http://bit.ly/17NkCOG sqlcmd: http://bit.ly/15ptd9U
  • 25. thanks so much for coming! ● e: jon_bachelor@me.com ● t: @DigiPug ● w: www.jonbachelor.com ● speakerrate.com/digipug ● slideshare.net/digipug