The WebApp Wizard Web development made magical


Zend Debugger configuration

One of the great things about Zend Studio is the integration of powerful tools like the Zend Debugger or the Profiler. But, in order to take full advantage of the IDE, there is some configuration to do.

Zend Debugger will allow you not only to debug your PHP code, of course, but will also allow you to profile your code. Profiling consists of measuring the time spent in each portion of your code. That means you will be able to know that you spend 200 milliseconds in function a(), then 700 milliseconds in function b(), then 32 milliseconds in function c(). You will also know that you didn't spend any time in function d(). Yes, you will be able to see which portions of your code are unused. And that's pretty cool.

Let's begin with the ZendDebugger extension itself. Just download it on Zend website (Studio Web Debugger).

You could then just follow the instructions given in the README file, but there might be some more to do.

First, check out which version of PHP you're using. You could have to call phpinfo() to have all the needed information. Take the corresponding version of the Zend Debugger extension. As usual, nts stands for "not thread safe", so again, be careful and chose the version you need, according to your PHP installation.

Copy that extension under you PHP extension dir.

Then, add the following to your php.ini file:

zend_extension_ts="Full path to ZendDebugger.[so|dll]"

You also have to set the following directives:

output_buffering = Off
implicit_flush = On

You can now copy the dummy.php file into your DocumentRoot.

You can now restart your web server.

Usually, everything is well configured under Zend Studio, but you might have to set the PHP Executable, PHP Server and go playing a bit in PHP Debug section.

I highly recommend to install the browser toolbar, which helps a lot when debugging/profiling your application. A simple click on a button will allow you to launch a debugging session, on any page, whereas it may be more complicated if you tried to do so directly under Zend Studio.

Comments (2) Trackbacks (1)
  1. Thanks for putting together Zend Debugger configuration The WebApp Wizard I am enjoying your posts. Would you consider a guest post on a site I help run? Do you think that you could contribute? You can see our post styles at and certainly we would be interested in having you post an article or two on our blog, what do you think? If you are interested let me know through the contacts page on our site.Zend Debugger configuration The WebApp Wizard is an interesting name for a blog, keep up the top effort, thanks, from Xyla Myers

Leave a comment


You can use basic HTML to enlighten your comments. If you want to post some code, please use the <pre> tag. You can also use syntax coloring by adding class="syntax [language]". <pre class="syntax js"> will color your code as if it was JS code for instance.