Debugging PHP, JSON and JavaScripts Application using PHP IDE - Part 2

Go To Part 1 of Debugging PHP, JSON and JavScripts Application using PHP IDE

We will now move on to :

Stepping through PHP and JavaScript code in Debugger

We used PhpED for editing of HTML and JavaScripts:

All sources for the scripts used in this article can be found here.

Once you mastered this setup debugging of GiveAd.php is almost trivial. You can:

  • Open GiveAd.php in PhpED
  • Open FireFox and enable FireBug
  • Point your browser to
     http://localhost/ShowAd.html
    When you do, you’ll notice that  PhpED became active – execution of GiveAd.php is interrupted at DebugBreak() line as shown on the picture below:
  • You now have the full control over the execution of the script: 
    • Check the values of the variables
    • Look at the output in Output Window
    • The full set of PHP debugging features is available.
  • You can easily switch from PHP debugging to JavaScript debugging in FireFox.
    • To run through the rest of the GiveAd.php script, simply hit “Run in Debugger” button again and the response will be generated and sent back to the JavaScript in ShowAd.html
    • Once that happens, you can start stepping through your JavaScript file in FireBug. 
Contnue to Part 3 of Debugging PHP, JSON and JavaScripts Application using PHP IDE

Go back to Part 1 of Debugging PHP, JSON and JavaScripts Application using PHP IDE
© Copyright 2003-2014 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.