【发布时间】:2014-01-27 23:19:09
【问题描述】:
我正在尝试使用 Sublime Text 2 设置 xdebug,但在使其正常工作时遇到了一些问题。
我在使用 xampp 的 Windows 7 环境中执行此操作,因此设置 XDebug 只需在 php.ini 文件中进行配置即可。以下是我的配置设置:
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.remote_enable = 1
xdebug.remote_host = "localhost"
xdebug.remote_port = 8000
xdebug.remote_handler = "dbgp"
xdebug.remote_mode = req
xdebug.remote_connect_back = 1
我的框架使用 laravel 4。
我为 sublime 安装了 xdebug 插件:https://github.com/martomo/SublimeTextXdebug
我相信这是正确设置的。我可以设置断点等。
在 sublime 中,我在我的 laravel 项目的根目录中创建了一个项目,并编辑 *.sublime-project 文件如下:
{
"folders":
[
{
"path": "/C/****/****/****/sites/questionairre/"
//this is the root of my project folder
}
],
"settings":
{
"xdebug":
{
"url": "http://localhost:8000"
}
}
}
现在已经不碍事了,我通常会设置一个断点,然后开始调试。打开 4 个窗口:“Xdebug 上下文”、“Xdebug Watch”、“Xdebug 堆栈”、“Xdebug 断点”。但是,我的默认浏览器没有打开。是不是配置有问题?
感谢您阅读这条长消息。
【问题讨论】:
标签: php laravel-4 sublimetext2 xdebug