xdebug
首先php需要開始xdebug的擴(kuò)展
然后,修改php配置文件
[XDebug]
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir ="D:\phpStudy\tmp\xdebug"
xdebug.trace_output_dir ="D:\phpStudy\tmp\xdebug"
xdebug.profiler_output_name = "cache.out.%t-%s"
xdebug.remote_enable = 1??? #開啟
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
zend_extension="D:\phpStudy\php53n\ext\xdebug.dll"
xdebug.idekey= PHPSTROM
?
其中remote_host?是指調(diào)試客戶端的地址,即IDE所在的IP,同理remote_port?是客戶端的端口,這兩項(xiàng)在遠(yuǎn)程調(diào)試的情況下注意修改,遠(yuǎn)程的時(shí)候最終改為:
[XDebug]
zend_extension = "D:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = "req"
xdebug.remote_port = 9000
最后重啟apache檢查是否成功開啟了xdebug服務(wù)。
一種方法為在CMD里輸入D:\xampp\php\php.exe -m?看到XDebug,說明成功開啟XDebug。
另一種方法為瀏覽器打開localhost,找到phpinfo()點(diǎn)擊打開配置情況,查找xdebug項(xiàng),找到了說明xdebug配置成功。
?
此時(shí)配合PhpStorm使用,參考http://www.cnblogs.com/neng-zheng/p/6209236.html
轉(zhuǎn)載于:https://www.cnblogs.com/georgelu/p/7661033.html
總結(jié)
- 上一篇: 在Debian/Ubuntu上面安装升级
- 下一篇: Week04-面向对象设计与继承