Do Not Think!!!

Posted
Filed under 01010101

1. apache 에서는 잘 동작하던 xdebug 가 nginx + php-fpm 설치 후 xdebug 가 동작을 안합니다.


원인

xdebug 의 포트(9000)와 php-fpm 의 포트(9000)가 충돌 하기 때문에

해결

xdebug 의 port 를 변경합니다.

xdebug 설정파일 수정
[CODE]$ vi /etc/php5/conf.d/xdebug.ini
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so

xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.remote_autostart=0[/CODE]

이클립스 설정 수정
이클립스 - Window - Preferences - PHP - Debug - Installed Debuggers - XDebug - Configure
Debug port 를 9001 로 변경합니다.
사용자 삽입 이미지



2. xdebug 에서 local variables 이 보이지 않습니다.


원인

xdebug 버그입니다.

해결

xdebug 를 업데이트 합니다.

[CODE]$ wget http://xdebug.org/files/xdebug-2.1.4.tgz
$ tar -xvzf xdebug-2.1.4.tgz
$ cd xdebug-2.1.4
$ phpize
$ ./configure
$ make
$ cp modules/xdebug.so /usr/lib/php5/20090626+lfs
$ /etc/init.d/apache2 restart[/CODE]