0
Say No To var_dump
                             Debugging PHP with Xdebug




Tuesday, 17 August 2010
Who am I?



Tuesday, 17 August 2010
Who are you?



Tuesday, 17 August 2010
What is Xdebug?



Tuesday, 17 August 2010
It turns this......




Tuesday, 17 August 2010
Tuesday, 17 August 2010
Into this.....




Tuesday, 17 August 2010
With a little more
                          work it turns it into
                                this.....


Tuesday, 17...
Tuesday, 17 August 2010
Tuesday, 17 August 2010
var_dump



Tuesday, 17 August 2010
It turns this......




Tuesday, 17 August 2010
Tuesday, 17 August 2010
Tuesday, 17 August 2010
How is this achieved?
                             php.ini

                             ini_set




Tuesday, 17 August 20...
Example Settings
 xdebug.dump.GET=*
 xdebug.dump.POST=*
 xdebug.dump.SERVER =
 REMOTE_ADDR,REQUEST_METHOD,HTTP_ACCEPT_LANG...
The Crown Jewels:
                          Remote Debugging


Tuesday, 17 August 2010
Say no to var_dump



Tuesday, 17 August 2010
Xdebug Remote Debug
                        Demo


Tuesday, 17 August 2010
Example Settings
            xdebug.remote_enable=1
            xdebug.remote_handler=dbgp
            xdebug.remote_mode=...
Example Settings




Tuesday, 17 August 2010
Installation

                • http://xdebug.org/docs/install
                • Deb / Ubuntu - Apt
                • PECL...
Questions?



Tuesday, 17 August 2010
Credits & Resources
                    • Derick Rethans - Author of Xdebug
                          ★   http://xdebug.or...
Me

                   Twitter: @bwaine
              Email: ben@ben-waine.co.uk



Tuesday, 17 August 2010
Upcoming SlideShare
Loading in...5
×

Say no to var_dump

1,986

Published on

Slides from my recent talk about debugging techniques using xdebug. Given at #bcblackpool and #phpleeds

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,986
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Say no to var_dump"

  1. 1. Say No To var_dump Debugging PHP with Xdebug Tuesday, 17 August 2010
  2. 2. Who am I? Tuesday, 17 August 2010
  3. 3. Who are you? Tuesday, 17 August 2010
  4. 4. What is Xdebug? Tuesday, 17 August 2010
  5. 5. It turns this...... Tuesday, 17 August 2010
  6. 6. Tuesday, 17 August 2010
  7. 7. Into this..... Tuesday, 17 August 2010
  8. 8. With a little more work it turns it into this..... Tuesday, 17 August 2010
  9. 9. Tuesday, 17 August 2010
  10. 10. Tuesday, 17 August 2010
  11. 11. var_dump Tuesday, 17 August 2010
  12. 12. It turns this...... Tuesday, 17 August 2010
  13. 13. Tuesday, 17 August 2010
  14. 14. Tuesday, 17 August 2010
  15. 15. How is this achieved? php.ini ini_set Tuesday, 17 August 2010
  16. 16. Example Settings xdebug.dump.GET=* xdebug.dump.POST=* xdebug.dump.SERVER = REMOTE_ADDR,REQUEST_METHOD,HTTP_ACCEPT_LANGUA GE,HTTP_ACCEPT_LANGUAGE Tuesday, 17 August 2010
  17. 17. The Crown Jewels: Remote Debugging Tuesday, 17 August 2010
  18. 18. Say no to var_dump Tuesday, 17 August 2010
  19. 19. Xdebug Remote Debug Demo Tuesday, 17 August 2010
  20. 20. Example Settings xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 xdebug.idekey="netbeans-xdebug" Tuesday, 17 August 2010
  21. 21. Example Settings Tuesday, 17 August 2010
  22. 22. Installation • http://xdebug.org/docs/install • Deb / Ubuntu - Apt • PECL • http://xdebug.org/find-binary.php Uses phpinfo() information to provide tailored installation instructions! Tuesday, 17 August 2010
  23. 23. Questions? Tuesday, 17 August 2010
  24. 24. Credits & Resources • Derick Rethans - Author of Xdebug ★ http://xdebug.org/ ★ http://derickrethans.nl/ ★ Recent DPC Tutorial ★ The mailing list (very active / quick response) Tuesday, 17 August 2010
  25. 25. Me Twitter: @bwaine Email: ben@ben-waine.co.uk Tuesday, 17 August 2010
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×