Slide 1

Slide 1 text

Techniques and Tools for Ef f icient Troubleshooting DEBUGGING PHP APPLICATIONS AARON HOLBROOK, 2023 ZEEK.COM

Slide 2

Slide 2 text

THE FIRST STEP OF DEBUGGING IS TO KNOW THAT A PROBLEM EXISTS. THE FINAL STEP IS FIXING IT. EVERYTHING IN BETWEEN IS PROBLEM-SOLVING.

Slide 3

Slide 3 text

The Hidden Cost of Software Development TIME SPENT ON DEBUGGING ACM The New Stack Coralogix VentureBeat 0 0.2 0.4 0.6 0.8 20% 75% 22% 42.5% ACM: https://queue.acm.org/detail.cfm?id=3068754 The New Stack: https://thenewstack.io/how-much-time-do-developers-spend-actually-writing-code/#:~:text=Breaking the data down by,14 Coralogix: https://coralogix.com/blog/this-is-what-your-developers-are-doing-75-of-the-time-and-this-is-the-cost-you-pay/#:~:text=4) 75,identifying & fi xing product defects VentureBeat: https://venturebeat.com/dev/developers-spend-20-of-their-time- fi xing-problems-and-its-killing-your-company/#:~:text=Developers spend 20,when it comes to

Slide 4

Slide 4 text

The Hidden Cost of Software Development FINANCIAL IMPACT OF DEBUGGING Debugging Cost in the US Annual Cost (in billions) $113 Coralogix: https://coralogix.com/blog/this-is-what-your-developers-are-doing-75-of-the-time-and-this-is-the-cost-you-pay/#:~:text=4) 75,identifying & fi xing product defects

Slide 5

Slide 5 text

AARON HOLBROOK Over 20 years of development experience Public Speaker & Workshop Leader Driven by E ff iciency & Problem-Solving A Lifelong Builder: Digital & Physical AARON HOLBROOK, 2023 ZEEK.COM Your Debugging Expert for the Day Principal Engineer at Zeek: Specializing in Solving Problems

Slide 6

Slide 6 text

A Strategic Guide to Mastering PHP Troubleshooting Debugging Fundamentals Analyzing Symptoms Asking the Right Questions Forming Hypotheses Finding the Root Cause Git Bisect The xDebug Deep Dive Practical Tips THE DEBUGGERS TOOLKIT AARON HOLBROOK, 2023 ZEEK.COM

Slide 7

Slide 7 text

DEBUGGING FUNDAMENTALS The Science Behind the Process

Slide 8

Slide 8 text

THE SCIENTIFIC METHOD A Tried and True Framework for Systematic Inquiry Observation Question Hypothesis Experimentation Analysis Conclusion AARON HOLBROOK, 2023 ZEEK.COM

Slide 9

Slide 9 text

SYMPTOM ANALYSIS The Hidden Language of Bugs: Understanding Symptoms

Slide 10

Slide 10 text

WHY ANALYZING SYMPTOMS IS CRUCIAL

Slide 11

Slide 11 text

SYMPTOM ANALYSIS Symptom Identi f ication: recognize what the symptoms are. Error message, unexpected output, performance bottleneck, etc Symptom Classi f ication: critical, major, minor, etc Correlation vs Causation: don't jump to conclusions. Two events occurring together doesn't mean one caused the other. Establish a causal link Logs and Metrics: Use logs and metrics to quantify symptoms. Numerical data can provide insights Monitoring Tools: Monitoring tools can alert you to issues before they become critical as well as give you an overview of frequency AARON HOLBROOK, 2023 ZEEK.COM

Slide 12

Slide 12 text

FROM SYMPTOMS TO QUESTIONS

Slide 13

Slide 13 text

THE RIGHT QUESTIONS The Next Step to Debugging Success

Slide 14

Slide 14 text

WHY QUESTIONS MATTER

Slide 15

Slide 15 text

TYPES OF QUESTIONS Diagnostic: When does this error occur? Causal: What changed recently? Exploratory: Could this issue be related to another feature? AARON HOLBROOK, 2023 ZEEK.COM

Slide 16

Slide 16 text

PRIORITIZING QUESTIONS

Slide 17

Slide 17 text

EXPERIMENTATION Strategies for Pinpointing Issues

Slide 18

Slide 18 text

STRUCTURED INVESTIGATION TECHNIQUES Logical Segmentation: Break complex problems into smaller pieces. Focus on individual modules or functionalities Binary Search Debugging: Divide the problem space into two halves and determine which half the issue lies in. Iteratively repeat the process and narrow down the problematic code section e ff iciently. Controlled Experiments: Create controlled environments to test your hypotheses. Separate testing database or extracting out potentially problematic modules, controlling variables lets you perform more simple and accurate tests. AARON HOLBROOK, 2023 ZEEK.COM

Slide 19

Slide 19 text

STRUCTURED INVESTIGATION TECHNIQUES Comparative Analysis: Compare the problematic system with a version that is working correctly. What di ff erences can you identify? Historical Data and Version Control: Utilize logs, past versions and change logs to understand what has changed. Issues are often introduced with new updates, historical data can provide valuable context. Documentation and Reporting: As you investigate, document your steps, f indings and rationale behind decisions. This is useful for team collaboration AND for postmortem analysis and for client communication. AARON HOLBROOK, 2023 ZEEK.COM

Slide 20

Slide 20 text

GIT BISECT Time-Traveling for Debuggers: Finding the Moment Things Broke

Slide 21

Slide 21 text

GIT BISECT A Git command-line tool for isolating the commit that introduced a bug. AARON HOLBROOK, 2023 ZEEK.COM What Is It

Slide 22

Slide 22 text

GIT BISECT AARON HOLBROOK, 2023 ZEEK.COM How It Works The Algorithm: Uses binary search to quickly identify problematic commits Good vs Bad Commits: Mark a known good commit and a known bad commit to start the search

Slide 23

Slide 23 text

GIT BISECT AARON HOLBROOK, 2023 ZEEK.COM Practical Application Why It's a Game-Changer: Saves time and increases accuracy in debugging PHP projects. Quick Walkthrough: A brief example of using git bisect in a PHP codebase

Slide 24

Slide 24 text

WALKTHROUGH

Slide 25

Slide 25 text

THE XDEBUG DEEP DIVE Advanced Debugging Powers

Slide 26

Slide 26 text

MASTERING XDEBUG Breakpoints Variable Inspection Evaluating Expressions Call Stack / Stack Trace Watches Your Ultimate Debugging Companion AARON HOLBROOK, 2023 ZEEK.COM

Slide 27

Slide 27 text

WALKTHROUGH

Slide 28

Slide 28 text

TIPS & TRICKS Debuggingโ€™s Best-Kept Secrets: Revealed

Slide 29

Slide 29 text

Reproducibility is Key Divide and Conquer Observe and Note Everything Learn Keyboard Shortcuts Keep the Code Base Clean Know When to Step Away Add Tracing When Stuck Think Outside the Box

Slide 30

Slide 30 text

CLOSING INSIGHTS The Debugging Chronicles: Final Chapter

Slide 31

Slide 31 text

CONCLUSION Debugging Fundamentals Analyzing Symptoms Asking the Right Questions Forming Hypotheses Finding the Root Cause Git Bisect xDebug Practical Tips Key Takeaways AARON HOLBROOK, 2023 ZEEK.COM

Slide 32

Slide 32 text

Q&A

Slide 33

Slide 33 text

๐ŸŒ Flexible Work Environment ๐Ÿ’ก Innovative Projects ๐ŸŒฑ Growth and Development Opportunities โš– Work-Life Balance ๐Ÿก 100% remote ๐Ÿ“œ Seasoned company history with top talent ๐Ÿ’ฐ Competitive Compensation ๐Ÿ›Œ Flexible Fridays Program ๐Ÿ– Flexible PTO ๐Ÿฉบ 401k, Health, Dental, Vision Insurance ๐ŸŽ‰ Fun as a Core Value: We believe life's too long to be so seriousโ€“ enjoy the journey with us! Join our Team! Inspired or curious? Reach out and let's discuss further! [email protected] Scan To Explore Opportunities