Zend Studio using breakpoint debugging, zendstudio_php tutorial

Source: Internet
Author: User
Tags php debugger

Zend Studio uses breakpoint debugging, Zendstudio


1, download Xdebug

1 # 下载地址
2 # http://xdebug.org/download.php
3
4 # 寻找和自己所安装的 php 版本对应的 Xdebug 下载
5 # 对于 Windows 版本的 php 可以查看 phpinfo() 函数的打印信息, 查找"PHP Extension Build", 看你的 PHP 版本是 VC 几的,

2, installation

1 # 安装说明页
2 # http://xdebug.org/docs/install
3
4 # 对于 Windows 版本, 下载完成后将下载的 dll 文件重命名为 php_xdebug.dll
5 # 将其复制到 PHP 的扩展目录中去 (例如: D:\Program Files\EasyPHP-5.3.2i\php\ext\ )

3, modify PHP.ini

01 # 在 php.ini 尾部增加一段, 改完之后重启 Web-Server
02 [Xdebug]
03 zend_extension="D:/Program Files/EasyPHP-5.3.2i/php/ext/php_xdebug.dll"
04
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 ;如果设得太小,函数中有递归调用自身次数太多时会报超过最大嵌套数错
09
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. Modify Zend Studio Settings

1 Window -> Preferences -> PHP -> Debug
2 # 将左侧 "Default Settings" 中的 "PHP Debugger" 设置为 "XDebug"

5. Create a new test.php file in the project

View Source print?
1
2 for($i = 0; $i< 10; $i++) {
3 if($i==5) {
4 echo'aa';
5 }
6 }
7 ?>

6, create a new Debug command

1 # 点击工具栏上"小蜘蛛"旁边的小箭头 -> Debug As -> PHP Web Page
2 # 会跳出 Debug 视图
3 # 在 "if ($i==5) {" 这一行前面加一个断点, 就可以进行单步调试了

http://www.bkjia.com/PHPjc/990889.html www.bkjia.com true http://www.bkjia.com/PHPjc/990889.html techarticle Zend Studio uses breakpoint debugging, Zendstudio 1, download Xdebug 1 # Download Address 2 #http://xdebug.org/download.php 3 4 # Find the Xdebug that corresponds to the version of PHP you have installed Download ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.