【问题标题】:Setting Up Sublime Text with XDebug (windows 7 environment)使用 XDebug 设置 Sublime Text(windows 7 环境)
【发布时间】: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


    【解决方案1】:

    我知道这个问题很久以前就被问过了,但万一它对某人有帮助......

    在让浏览器打开方面,我设置了"url": "http://localhost/index.php",即在路径中包含index.php,然后在点击开始调试(启动浏览器)时启动浏览器。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-14
      相关资源
      最近更新 更多