您的位置:首页 > 编程语言 > PHP开发

[转]sublime使用xdebug调试php

2013-11-05 18:30 357 查看
安装php xdebug扩展

这个应该不用说吧。先安装xdebug PHP扩展 . 配置php.ini文件

[plain] view
plaincopy

[XDebug]

zend_extension = "D:\xampphp\xamphp\php\ext\php_xdebug.dll"

xdebug.remote_enable = on

xdebug.remote_handler = "dbgp"

xdebug.remote_host = "127.0.0.1"

xdebug.remote_port = 9000

重启apache 其它的web服务软件. phpinfo() 查看有没有xdebug扩展
安装sublime xdebug

安装sublime插件.使用Package Control

在sublime text 快捷键ctrl+shift+p 打package control 输入install 回车确认。 如图:



然后,输入xdebug 回车确认,等待安装成功 重启sublime 如图:





安装浏览器插件 调试php

安装chrome插件.Xdebug helper 配置xdebug helper .打开chrome扩展选项.

如图配置:



保存,重启下chrome . firefox也有插件.现在正式进入sublime调试

sublime 打开一个.php文件.随便选择一行 ctrl+ f8 下个断点.然后shift + f8 进入调试



打开chrome 输入localhost/company/test.php 我的示例地址,如图:



选择Debug这项,F5刷新页面.调试成功如下图:



sublimexdebug的一些快捷键

Shift+f8
:
打开调试面板
f8
:打开调试面板快速连接
Ctrl+f8
:
切换断点
Ctrl+Shift+f5
:
运行到下一个断点
Ctrl+Shift+f6
:
单步
Ctrl+Shift+f7
:
步入
Ctrl+Shift+f8
:
步出

到此为止,用sublime调试php就结束了. 个人感觉还是没有Netbeans的调试方便,功能也没有它的强大

转载自:http://blog.csdn.net/ainimfkgdyve/article/details/9165587

作者:liuzhushiqiang 发表于2013-11-5 18:29:44 原文链接

阅读:19 评论:0 查看评论
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: