Posts Debug PHP on Windows

Debug PHP on Windows

Following are the steps to debug your PHP code using Zend Debugger on Windows machine via WAMP,

  1. Download or check for new version at

  2. Locate or ZendDebugger.dll file that is compiled for the

correct version of PHP (4.3.x, 4.4.x, 5.0.x, 5.1.x, 5.2.x) in the

appropriate directory.

Get debugger from folder called “5_2_x_comp” or you may receive some errors about a non-thread   safe debugger if you take it from “5_2_x_nts_comp”

  1. Configure php.ini for output buffering when debugging

implicit_flush = On ; Default: Off
= Off ; Default: 4096

  1. Add the following line to the php.ini file:

Linux and Mac OS X:     zend_extension=/full/path/to/

Windows:                zend_extension_ts=/full/path/to/ZendDebugger.dll

Windows non-tread safe: zend_extension=/full/path/to/ZendDebugger.dll

(*) the windows non-thread safe is used only with Zend Core 2.0


if you don’t have a Zend section you may add this at the end of the fie.

correct the php path if it is not installed in c:\wamp\www and extension directory.

  1. Add the following lines to the php.ini file:



This willl allow connections from local host and from your local network to addresses which start        with 192.168.1.

  1. Place dummy.php file in the document root directory.

  2. Restart web(Apache/Wamp) server.

  3. To activate the debugger please use following query string:



above statement assumes that the debugger listens at or on port 10000.

Here are some of the screen shots from my debugger,

Breakpoint in Zend

Breakpoint in Zend

This is watch window in Zend which will show the values of the variables, you need to add the variable to the watch window to view its values.

Watch Window in Zend

Watch Window in Zend

This is the output window that shows the output generated by the code executed till now,

Output Window in Zend

Output Window in Zend

Hope this helps :-)

This post is licensed under CC BY 4.0 by the author.