Maison  >  Article  >  développement back-end  >  mac sublime3+xdebug+firefox调试环境的搭建

mac sublime3+xdebug+firefox调试环境的搭建

WBOY
WBOYoriginal
2016-07-30 13:30:322099parcourir

第一步:配置php xdebug扩展

[xdebug]
zend_extension=/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey="sublime.xdebug"
xdebug.remote_log="/var/log/xdebug/xdebug.log"

第二步:安装sublime xdebugclient(不是xdebug)

第三步:安装php xdebug扩展

sublime中安装sublime xdebug client,此处一定要安装带client的,而不是sublime xdebug。注意安装完成后,在sublime中ctrl+shift+p  ,输入xdebug,如果出现以下这些选项,则已经安装成功。

第四步:配置sublime xdebug

用sublime打开你要调试的程序,点击sublime导航的Project->save project as。生成一个.sublime-project的文件,修改其为:


下面是我的MAC配置

{
  "folders":
  [
    {
      "path": "/Applications/xampp/xamppfiles/htdocs"
    }
  ],
  "settings":
  {
    "xdebug": {
  "path_mapping": {
  },   
  "url": "http://127.0.0.1/test.php",
  "super_globals": true,
  "close_on_stop": true,
  "port": 9000   
        }
  }
}

第五步:下载firebox插件easiest Xdebug

点击绿色的小爬虫,点亮代表调试状态开启,第一次不点击开启,调试无效

第六步:测试调试

 在待调试的文件中加断点之后,在sublime中 tools --> xdebug  --> 开始调试 。此时在浏览器中开上面配置步骤中所设置的url:http://127.0.0.1/test.php,进入断点,完成调试。

版权声明:本文为博主原创文章,未经博主允许不得转载。

以上就介绍了mac sublime3+xdebug+firefox调试环境的搭建,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn