jeudi 21 mars 2013

XDebug avec NetBeans

Configurer XDebug pour Netbeans en remote pour WEB et CLI pour Ubuntu

Contexte

Machine de développement : Netbeans (pas de contrainte d'OS, testé sous windows 7)
Serveur WEB : testé sur ubuntu 10.04.4

Installation

    apt-get install php5-xdebug

Configuration

Editer le fichier /etc/php5/conf.d/xdebug.ini

zend_extension=/usr/lib/php5/20090626/xdebug.so
xdebug.remote_enable=on
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_mode=req
xdebug.show_exception_trace=On
xdebug.remote_connect_back = 1
xdebug.remote_autostart=0

debug

#!/bin/bash
host=$(echo $SSH_CLIENT | sed -e 's/ .*//')
export XDEBUG_CONFIG="idekey=netbeans-xdebug remote_host=$host"
php $*

Aucun commentaire:

Enregistrer un commentaire