原创帖子
第一步:安装PHP5.4,使用phpinfo输出信息,确认安装成功。
第二步,我们要将xdebug配置起来.
1.进行xdebug的官方
2
3.XDEBUG官方默认会把你带入自动配置页面http://www.xdebug.org/find-binary.php,把本机中输出的phpinfo的页面内容复制出来,粘贴到底部的文本区域里。注意是直接在网页中全选复制,而不是复制网页的源代码。Do
4.粘贴后,点击
Summary
-
Xdebug
installed: 2.2.2 -
Server
API: FPM/FastCGI -
Windows:
no -
Zend
Server: no -
PHP
Version: 5.4.14 -
Zend
API nr: 220100525 -
PHP
API nr: 20100525 -
Debug
Build: no -
Thread
Safe Build: no -
Configuration
File Path: /usr/local/etc -
Configuration
File: /usr/local/etc/php.ini -
Extensions
directory: /usr/local/lib/php/extensions/no-debug-non-zts-20100525
5.Xdebug
6.配置xdebug的部分配置,更详细的见官网:
[xdebug]
;用中括号表示出来的是模块名称,它会在你的phpinfo信息中作为大的分隔的标题显示出来.
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
;设置php_xdebug的dll文件路径和名称.
xdebug.auto_trace=On
;Xdebug会将php的对函数调用的监测的信息用文件格式输出来
xdebug.collect_params=On
;Xdebug会将php的对函数调用的参数加入到函数过程调用的监测中
xdebug.collect_return=On
;将函数调用的返回值加入到函数过程调用的监测中
xdebug.trace_output_dir="E:/td/debug"
;设置的函数调用监测信息的输出路径
xdebug.profiler_enable=On
;这是效能监测的设置开关
xdebug.profiler_output_dir="/usr/local/var/xdebug"
;这是效能监测信息设置为on的情况下,写入到profiler_output_dir设置的路径中,会生成一个相应的文件.
第三步:让netbean和xdebug结合起来.在xdebug文件中加入
;
;xdebug.extended_info
;xdebug.idekey
xdebug.remote_autostart=on
xdebug.remote_connect_back=1
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_log="/usr/local/var/xdebug"
;xdebug.remote_mode
xdebug.remote_port=9001
第四步:设置netbean的参数
项目的设置
运行方式
项目URL:****/index.php
调试的设置
调试端口:[xdebug中设置的端口]
会话id:随意
第五步:
相关的
至此
如何
原创帖子