Upgrade to Pro — share decks privately, control downloads, hide ads and more …

xdebug

 xdebug

Peter Tilsen

July 14, 2015
Tweet

More Decks by Peter Tilsen

Other Decks in Technology

Transcript

  1. XDebug • What is this and what is it good

    for? • Installation • Configuration • Breakpoints • Watches • Demo
  2. XDebug What is this and what is it good for?

    • PHP extension providing debugging and profiling capabilities • Display features • Traces • Coverage analysis • Remote debugging • Profiling (xdebug profiler)
  3. XDebug What is this and what is it good for?

    • Display features • Replaces var_dump(), provides more readable output (http://xdebug.org/docs/display)
  4. XDebug What is this and what is it good for?

    • Traces • Stack traces • Function traces
  5. XDebug What is this and what is it good for?

    • Coverage analysis • Used by phpunit (clover report etc.)
  6. XDebug What is this and what is it good for?

    • Remote debugging • Interface for remote debugging (phpstorm)
  7. XDebug Cli mode • Debugging cli script calls • export

    XDEBUG_CONFIG=“idekey=PHPSTORM" • php -d memory_limit=500M ./bin/phpunit -c app / vagrant/src/Uniplaces/AccommodationBundle/ Tests/Functional
  8. XDebug Breakpoints • Intentional stopping or pausing place in a

    program • setting • disabling • suspending with condition • (logging, removing once hit, etc.)
  9. XDebug Watches • Tool for further inspection of values of

    selected variables and expressions • add, edit and remove (see demo)