Debugging

Prepare your toolkit to detect bugs,
fix bugs and avoid them in the future.

February 25th, 2019 / Faktor E Multimedia GmbH

Since Garvin said the last presentation was too yellow...

...let's make
it a bit more colorful
this time! ;-)

Buzzword Bingo!

  • echo $foobar;
  • Behat tests
  • Profiling
  • var_dump($foobar);
  • Functional tests
  • die('Yeehaaw.');
  • Log file analysis
  • console.log(foobar);
  • Acceptance tests
  • System monitoring
  • print_r($foobar);
  • Unit tests
  • Application monitoring

Is all of this
debugging?

Debugging is the process of finding and resolving defects or problems within a computer program that prevent correct operation of computer software or a system. https://en.wikipedia.org/wiki/Debugging
Debugging tactics can involve interactive debugging, control flow analysis, unit testing, integration testing, log file analysis, monitoring at the application or system level, memory dumps, and profiling. https://en.wikipedia.org/wiki/Debugging

Let's define some headlines

Bug Avoidance
Part I

Your IDE is your friend

Know
how to
use it

Analysis completed

#

Code Style

#

Auto Completion

#

Warnings & Errors

# #

Future workshops?

  • Code Styling Standards

  • PHP Standards Recommendations Overview

  • PhpStorm Tips & Tricks

Error Analysis
&
Bug Fixing

How to
analyse
a bug...

var_dump($foobar);
 

???

var_dump($foobar);
die('DIE!');

???

Bug Avoidance
Part II

Test Driven Development

Write your test first

This will not work for most of our projects

Not using TDD does not mean to have no automated test at all

Future workshops?


  • Unit testing

  • Functional testing

  • Behat testing

  • Acceptance testing

Profiling
Optimization
Monitoring

Future workshops?

  • Xhprof

  • Server Monitoring

  • Application Monitoring

  • External caching solutions

Finally...

...drum roll...

...here we go...

I only found this crappy version of the logo.

I only found this crappy version of the logo.
Maybe that's the reason that so few people use this tool. ¯\_(ツ)_/¯
Anyway...

...let's do some live coding...