Step 2: Debug and test

banner3.jpg

PHsPeed has a XDebug (www.xdebug.org) client build in. This allows you to step through your php code (even within ajax events) and investigate the flow of your application, values of variables and objects (max. 7 levels deep!), set breakpoints etc. Another important feature is that you can debug your javascript from within the IDE. Since PHsPeed makes use of Chromium, we also embedded the Chromium javascript debugger. Of course you can click and go with your application. But using a development tool without decent debugging facilities is like walking a paved path in the forest. As long as you stay on that path, you're ok. As soon as you want something different...

To enable the use of XDebug you need to have XDebug installed and configured. PHsPeed will validate your config script and show it in the IDE for you to modify. The configuration of XDebug might differ, but within the WAMP package the php.ini file should have an entry like below (depending on your php version the dll might have a different name). Be aware, it is possible that PHsPeed will find more than one php.ini. That is because phpspeed will run php.exe when needed which is another path than the embedded php from the apache webserver.

; XDEBUG Extension

zend_extension = "c:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11-x86_64.dll"
;
[xdebug]
xdebug.remote_enable = on
xdebug.extended_info = 1
xdebug.profiler_enable = on
xdebug.profiler_enable_trigger = on
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.remote_log="c:/wamp/tmp/dbg.log"
dbg1 While debugging you can investigate the values of a variable by hovering the mouse over the variable.
dbg2 Set and reset breakpoints to follow the flow of your program. Step into, step over, all common debugging operations are available.
dbg3 Inspect the values of variables, arrays and objects up to 7 levels deep.
dbg4 Inspect the values of session variables on input and output
dbg7

Inspect the values of raw JSON messages that are returned to your forms.

dbg5
Inspect the parsed JSON messages
dbg6
Inspect the values of $_Post
dbg8
Inspect the values of $_Get
Tags: None

About author

administrator

administrator

We are all dedicated to PHsPeed. It's not the art of finding new customers, but the art of keeping them. If you like the product: spread the word. If you have issues let us know!
My articles

You can search the FAQ by entering a search string below.


Or just go to the faq page you can find
here


Perhaps you are interested in some instruction video's. You can find the introduction video's
here