在linux  NETBEAN7.4中使用 XDEBUG…
2014-06-25 12:09
423 查看
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
原创帖子 转载注明出处
第一步:安装PHP5.4,使用phpinfo输出信息,确认安装成功。
第二步,我们要将xdebug配置起来.
1.进行xdebug的官方 http://www.xdebug.org/.
2 进入下载页面选择适合你的版本下载. http://www.xdebug.org/download.php
3.XDEBUG官方默认会把你带入自动配置页面http://www.xdebug.org/find-binary.php,把本机中输出的phpinfo的页面内容复制出来,粘贴到底部的文本区域里。注意是直接在网页中全选复制,而不是复制网页的源代码。Do not paste the raw HTML (from view-source) into the form.
4.粘贴后,点击 analyse my phpinfo() output提交,Xdebug会根据你的phpinfo的信息,给你如下建议。
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文件路径和名称. 有些老的教程使用zend_extension_ts. 这个在新的XDEBUG中已经改了。千万注意了。
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文件中加入
; Remote Debugging
;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的参数
项目的设置
运行方式 : 本地web
项目URL:****/index.php
调试的设置
调试端口:[xdebug中设置的端口]
会话id:随意
第五步: 浏览器设置 推荐 firefox 其他的也可以尝试,本例子 在ff中通过 在chromium 中也通过 就是 扩展难以下载
相关的 浏览器 扩展 见 http://xdebug.org/docs/remote
至此 就可以 进行 单步调试了
如何 爽把?????
原创帖子 转载注明出处
#php #linux
原创帖子 转载注明出处
第一步:安装PHP5.4,使用phpinfo输出信息,确认安装成功。
第二步,我们要将xdebug配置起来.
1.进行xdebug的官方 http://www.xdebug.org/.
2 进入下载页面选择适合你的版本下载. http://www.xdebug.org/download.php
3.XDEBUG官方默认会把你带入自动配置页面http://www.xdebug.org/find-binary.php,把本机中输出的phpinfo的页面内容复制出来,粘贴到底部的文本区域里。注意是直接在网页中全选复制,而不是复制网页的源代码。Do not paste the raw HTML (from view-source) into the form.
4.粘贴后,点击 analyse my phpinfo() output提交,Xdebug会根据你的phpinfo的信息,给你如下建议。
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文件路径和名称. 有些老的教程使用zend_extension_ts. 这个在新的XDEBUG中已经改了。千万注意了。
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文件中加入
; Remote Debugging
;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的参数
项目的设置
运行方式 : 本地web
项目URL:****/index.php
调试的设置
调试端口:[xdebug中设置的端口]
会话id:随意
第五步: 浏览器设置 推荐 firefox 其他的也可以尝试,本例子 在ff中通过 在chromium 中也通过 就是 扩展难以下载
相关的 浏览器 扩展 见 http://xdebug.org/docs/remote
至此 就可以 进行 单步调试了
如何 爽把?????
原创帖子 转载注明出处
#php #linux
相关文章推荐
- linux下创建管理员组 使用 su - 命令
- 在 Linux 平台下使用 JNI
- Linux 下使用 NMON&nbsp…
- 在 Linux 平台下使用 JNI
- 【转】linux下minicom的 使用
- .Linux 下使用 NMON&nbs…
- 把 映射到xml中本来就该使用&#160来代替
- 最简单的 Git 使用流程
- 使用fsck命令修复linux文件系统错误【避开引起系统崩溃,启动不了的"-a"选项】
- 如何使用 Pie controls功能
- 使用ubuntu镜像修改fedora的linux …
- linux-2.6.26.5内核的 lcd驱动移植…
- 使用 jQuery 简化 Ajax 开发
- linux-2.6.26.5内核的 lcd驱动移植…
- linux--系统设置--命令
- C++ 使用 string 型態
- 使用 C++ 来编写 Web 应用
- <Linux+Qt>在Widget中使用qlabel显示图片与动画
- 最简单的&nbsp;Git&nbsp;使用流程
- Flash&nbsp;Builder&nbsp;4.7使用&amp;…