Zend Debugger

Debian 6/7

PHP 5.4

wget http://repos-source.zend.com/zend-server/preview-php5.4/deb/pool/php-5.4-debugger-zend-server_5.3.33+b7_amd64.deb
dpkg -x ./php-5.4-debugger-zend-server_5.3.33+b7_amd64.deb ./php-5.4-debugger-zend-server
cd ./php-5.4-debugger-zend-server
cp ./usr/local/zend/lib/debugger/php-5.4.x/ZendDebugger.so /usr/lib/php5/ZendDebugger.so
cp ./usr/local/zend/etc/conf.d/debugger.ini /etc/php5/mods-available
export STRING_TO_REPLACE=/usr/local/zend/lib/debugger
export STRING_TO_REPLACE_IT=/usr/lib/php5/ZendDebugger.so
sed -i.bak s~$STRING_TO_REPLACE~$STRING_TO_REPLACE_IT~g /etc/php5/mods-available/debugger.ini
ln -s /etc/php5/mods-available/debugger.ini /etc/php5/fpm/conf.d/30-debugger.ini

Затем перезавустите свой сервер. К примеру service php5-fpm restart или какой там у вас.

Настройка zend debugger

; register the extension to be loaded by Zend Extension Manager
zend_extension_manager.dir.debugger=/usr/lib/php5/ZendDebugger.so
; Specifies the hosts that are allowed to connect (hostmask list) with Zend Debugger when running a remote debug session with Zend Studio
zend_debugger.allow_hosts=127.0.0.1/32,10.0.0.0/8,192.168.0.0/16,172.16.0.0/12
; Specifies the hosts that are not allowed to connect (hostmask list) with the Zend Debugger when running a remote debug session with Zend Studio
zend_debugger.deny_hosts=
; A list of hosts (hostmask list) that can use the machine on which Zend Server is installed to create a communication tunnel for remote debgging with Zend Studio. This is done to solve firewall connectivity limitations
zend_debugger.allow_tunnel=
; The user ID of the httpd process that runs the Zend Debugger (only for tunneling)
zend_debugger.httpd_uid=-1
; A range of ports that the communication tunnel can use. This defines the minimum value for the range
zend_debugger.tunnel_min_port=1024
; A range of ports that the communication tunnel can use. This defines the maximum value for the range
zend_debugger.tunnel_max_port=65535
; Define which clients know that the Zend Debugger is installed:
; 0 - Never. The presence of the Zend Debugger is not detected by other clients
; 1 - Always. All clients can detect the Zend Debugger
; 2 - Allowed Hosts. Only clients listed in zend_debugger.allow_hosts can detect the Zend Debugger
; Any other value makes the Zend Debugger undetectable (same as "Never")
zend_debugger.expose_remotely=2
; The Debugger's timeout period (in seconds) to wait for a response from the client (Zend Studio) (units: seconds)
zend_debugger.passive_mode_timeout=20
; Enables fast time sampling which is dependent on CPU cycles and frequency, otherwise, the directive uses operating system timing (which may be less accurate)
zend_debugger.use_fast_timestamp=1
; Enable code-coverage feature, should only be true on local debugger
zend_debugger.enable_coverage=0