-
软件下载:
a. xdebug扩展:
b. xdebug-client(sublime):https://xdebug.org/download.php
c. xdebug-helper(chrome):xdebug client
https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc
-
安装xdebug:
a. 下载:
git clone git://github.com/xdebug/xdebug.git
b. 安装:
b-1. 进入目录:
b-2. 生成编译文件:cd xdebug
b-3. 编译:phpize
b-4. 安装:./configure --enable-xdebug --with-php-config=/usr/local/php/bin/php-config
make && make install
-
配置:
a. php.ini:
[xdebug] zend_extension="C:\assembly\appserv\php5\ext\php_xdebug-2.5.3-5.6-vc11.dll" xdebug.remote_enable = 1 xdebug.remote_host = "localhost" xdebug.remote_port = 9000 xdebug.remote_handler = "dbgp" xdebug.remote_mode = req xdebug.remote_connect_back = 0
b. Xdebug.sublime-settings(sublime):sublime+xdebug-client+xdebug-helper本地调试 { "super_globals": true, "close_on_stop": true, "ide_key": "web" }
c. xdebug.sublime-project(sublime):sublime+xdebug-client+xdebug-helper本地调试
d. xdebug-helper(chrome):{ "folders": [ { "path": "." } ], "settings": { "xdebug": { "close_on_stop": true, "super_globals": true, "url": "http://localhost" } } }
other--web
sublime+xdebug-client+xdebug-helper本地调试 -
调试:
a. 添加断点:
ctrl + F8
-
常用快捷键:
a. 打断点:
ctrl + F8
ctrl + shift + F9
ctrl + shift + F5