zend studio 使用断点调试
1, 下载 Xdebug
2, 安装
3, 修改 php.ini
03 |
zend_extension= "D:/Program Files/EasyPHP-5.3.2i/php/ext/php_xdebug.dll" |
05 |
xdebug.profiler_enable=on |
06 |
xdebug.trace_output_dir= "E:/xdebug" ;xdebug 的数据文件目录 |
07 |
xdebug.profiler_output_dir= "E:/xdebug" ;xdebug 的数据文件目录 |
08 |
xdebug.max_nesting_level = 10000 ;如果设得太小,函数中有递归调用自身次数太多时会报超过最大嵌套数错 |
10 |
xdebug.remote_enable= true ;Xdebug允许远程IDE连接 |
11 |
xdebug.remote_host=127.0.0.1 ;允许连接的zend studio的IP地址 |
12 |
xdebug.remote_port=9000 ;反向连接zend studio使用的端口 |
13 |
xdebug.remote_handler=dbgp ;用于zend studio远程调试的应用层通信协议 |
4, 修改 Zend Studio 设置
1 |
Window -> Preferences -> PHP -> Debug |
5, 在项目中新建一个 test.php 文件
2 |
for ( $i = 0; $i < 10; $i ++) { |
6, 新建一个 Debug 命令
原文地址:https://www.cnblogs.com/phpcoder/p/4462134.html