views:

2226

answers:

3

Is it possible to run both debuggers within the same PHP installation simultaneously. They both use different ports so communication with the client IDEs/other apps wouldn't be an issue.

I ask only because using the Zend Debugger with ZendStudio has proven to be much easier (fewer steps to start/stop debugging from the browser), but I really like some of the profiling tools available that only work with XDebug. So in a nutshell, I would love to be able to have the best of both worlds if possible.

+1  A: 

It is possible - the simplest way on a development web server would be to run 2 different apache processes with different php.ini files referencing the different debugger modules

timmow
So simply enabling both of them within the same php.ini file wouldn't work?
Wilco
No - the debugger modules conflict with each other. But a nice workaround is too setup 2 apache instances on different ports, each using a different php.ini file, one loading zend debugger, the other loading xdebug. You can then point each debugger at its relevant web server, and run both side by side.
timmow
+3  A: 

http://www.suspekt.org/2008/08/04/xdebug-203-stealth-patch/ (in particular the last comment) seems to indicate that the profiling parts of Xedebug will work fine alongside Zend Debugger, with the patch installed.

Greg
How to apply the patch ?
Ibn Saeed
A: 

So, XDebug is known not to work with many Zend tools (I know Zend Optimizer for certain, I don't know about Zend Debugger but I wouldn't be surprised if XDebug has a built-in check for that).

Since you're running the debugger and profiler on a dev machine, I don't see why you can't maintain two separate ini files. Otherwise, you'll have to compile a custom version of yourself that bypasses the checks.

Edward Z. Yang