配置zend debugger

简介: 安装zend debugger环境: xmapp mac下周zend studio http://www.xue51.com/mac/1623.html下周zend debuggerhttp://www.

安装zend debugger

  1. 环境: xmapp mac
  2. 下周zend studio http://www.xue51.com/mac/1623.html
  3. 下周zend debugger
    http://www.zend.com/en/products/studio/downloads#Mac%20OS
  4. 下载后解压,把ZendDebugger.so 拷贝到xmapp安装目录的php文件夹下,
    默认地址: /Applications/XAMPP/xamppfiles/php/ZendDebugger.so
  5. 修改php.ini文件
    默认地址: /Applications/XAMPP/xamppfiles/etc/php.ini
  6. 创建一个新文件, 输入 <?php
    phpinfo();
  7. 检查是否含有zend debugger


    img_dc0ae016bd9025b78242c67eed4902ad.png
    image.png

配置debugger(phpstorm)

  1. 安装chrome插件 Zend Debugger Toolbar
  2. 打开phpstorm, 新建项目Test


    img_800bf60afab2fbb9c7e1581ea9b461d8.png
    image.png
  3. 打开php配置,如图


    img_06c2278c1dedc8682c40b1284893b25f.png
    image.png
  4. 选择解释者,点击下拉列表,选择php 5.5


    img_20441e58d2a58519ec3366c413c8a122.png
    image.png
  5. 配置server,点击 php下面的servers


    img_0c97e6d404490e315a3b6d6fd4f07dc1.png
    image.png
    • 点击 + 号,在弹出的窗口填写内容
    • Name 服务器名称,我的是test
    • Host 主机 127.0.0.1 或者localhost都行
    • Debugger 选择Zend Debugger
    • 点击确定

测试debugger

  1. 在我们建好的test项目里新建index.php文件,输入内容并打上断点,如图


    img_a2e654aec4602b205a1e26138d99674c.png
    image.png
  2. 在浏览器端,打开我们先前按照的插件 Zend Debugger Toolbar,选择要调试的页面


    img_54c85a683e5d3e0365328784967f700f.png
    image.png
  3. 在phpstorm里打开监听,打开调试,如图


    img_83334ba5b9950b3f5003b912d5e26461.png
    image.png
  4. 在浏览器输入http://localhost/test/,你就会发现浏览器的title哪里在转圈
    img_3e64b2b21734af43d7035f6882a9f104.png
    image.png
  5. 回到phpstorm,点击左下角的debugger,再点击右边那个斜向下的箭头,右上角的地方就出现了变量的值


    img_5cb5f22af90a0c4e8ce77b77da2705d8.png
    image.png
  6. 到此,php的断点调试就完成了.
目录
相关文章
|
5月前
[√]lua加载dll
[√]lua加载dll
61 0
|
PHP Windows
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
125 0
windows下 Call to undefined function posix_getpid() in ……\Workerman\Worker.php 的解决方法
|
前端开发 PHP Apache