Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Essential debugging php debugging techniques, tips & tricks

1,963 views

Published on

Debugging code is an essential task for every software developer. PHP is one of the most popular programming languages, but setting up debugging for PHP applications may be tricky. This session will demonstrate what debugging technologies and tools are available for PHP. How to debug CLI scripts, Web apps and REST services. What's the easiest way to set up debugging for the different server environments: local, remote, cloud or virtualized; in development or in production.

Published in: Software
  • There is a useful site for you that will help you to write a perfect and valuable essay and so on. Check out, please ⇒ www.WritePaper.info ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hello! I have searched hard to find a reliable and best research paper writing service and finally i got a good option for my needs as ⇒ www.HelpWriting.net ⇐
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I think you need a perfect and 100% unique academic essays papers have a look once this site i hope you will get valuable papers, HelpWriting.net
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Essential debugging php debugging techniques, tips & tricks

  1. 1. Essential Debugging PHP Debugging techniques, tips & tricks Kaloyan Raev Zend / Rogue Wave
  2. 2. $ whoami Zend Studio Team Lead Eclipse Committer Live in Sofia, Bulgaria Skier
  3. 3. Why Debugging? Because we make bugs Because we want to fix them!
  4. 4. Debugging in PHP 101 echo $myvar; var_dump ( $myvar ); die ( "Unexpected value in myvar: $myvar" ); error_reporting ( E_ALL );
  5. 5. Better Way? Use a debugger!
  6. 6. Breakpoints $left == 10
  7. 7. Stack Traces
  8. 8. Variables Overview
  9. 9. Fine Execution Control
  10. 10. Changes in Last Step
  11. 11. In-Editor Inspections Shift + Ctrl + I
  12. 12. Watched Expressions
  13. 13. Multiple Sessions
  14. 14. PHP Debugger Engines Xdebug Zend Debugger phpdbg
  15. 15. Xdebug Zend Debugger phpdbg Built-in PHP ✅ Communication protocol DBGp XML-based binary PHP-specific own XML-based Available in PHP 7 (as of today) ✅ IDE Support ✅ ✅ Remote Debugging ✅ ✅ ✅ Profiling ✅ ✅
  16. 16. The Easiest Way for Setting Up PHP with Debugger Out of the box! v8.5 provides both Xdebug and Zend Debugger
  17. 17. Docker Containers tommylau/xdebug - Apache + PHP + Xdebug Tutorial: Debugging PHP Web Apps in a Docker Container
  18. 18. Just CLI Scripts Zend Studio bundles PHP binaries with Zend Debugger included
  19. 19. No IDEs Please phpdbg is for you Built-in PHP since 5.6 as SAPI module CLI user interface
  20. 20. Do It Yourself Stack Instructions for Zend Debugger Instructions for Xdebug Instructions for phpdbg
  21. 21. Browser Toolbars Xdebug Zend Debugger Browser Toolbar Debug Engine IDE 1. R equest w ith debug cookie 1. Request broadcast port 2.O pen debug session 4.O pen debug session 2. Response with debug info 3. R equest
  22. 22. Xdebug Toolbars Chrome ➢ Xdebug helper ➢ Xdebug enabler Firefox ➢ The easiest Xdebug ➢ easy Xdebug Opera ➢ Xdebug ➢ Xdebug launcher Safari ➢ Xdebug Toggler
  23. 23. Zend Debugger Toolbars Chrome ➢ zDebug Firefox ➢ Zend Firefox Toolbar Internet Explorer ➢ Zend Internet Explorer Toolbar
  24. 24. Z-Ray
  25. 25. Z-Ray Live!
  26. 26. Remote Debugging Intranet Direct Internet Connection Firewall / Proxy ➢ SSH Tunneling - works for both Xdebug and Zend Debugger ➢ Zend Debugger Tunneling - easier to setup, does not require Zend Server
  27. 27. Debug Mode Every request to server triggers a new debug session in IDE Useful for debugging requests from mobile apps Available only for Zend Debugger in Zend Server
  28. 28. Thank you! Rate this talk: https://joind.in/15612 Follow me: @kaloyanraev

×