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

Intro to Xdebug

Intro to Xdebug

A lazy persons guide to debugging with Xdebug.

claudiomettler

August 27, 2015
Tweet

More Decks by claudiomettler

Other Decks in Programming

Transcript

  1. xdebug... • ...provides new functions useful for debugging, logging and

    testing • ...changes the behaviour of some core PHP functionality • ...does profiling • ...implements a remote debugging protocol 2
  2. A word of caution • do not run on live

    servers (for performance and security reasons) • may cause extreme twitchiness when watching people debug without a debugger 3
  3. Modified behaviour • includes a stack trace in error messages

    • var_dump can do colors now • function nesting limit of 100! • etc. 5
  4. 6

  5. 7

  6. remote debugging: Installation • pecl install xdebug • apt-get install

    php5-xdebug • edit config:
 
 xdebug.remote_connect_back=1
 xdebug.remote_enable=1
 9
  7. 15

  8. 16

  9. 17