无法让 Xdebug 与 Sublime Text 3 一起工作

Can't get Xdebug to work with Sublime Text 3

我正在使用 Nginx 和 PHP 5.5.29(使用 php-fpm),通过包控制安装 xdebug

这是我在 php.ini

中的 xdebug 配置
zend_extension = /usr/local/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.remote_log = "/var/log/xdebug/xdebug.log"
xdebug.var_display_max_depth = 5
xdebug.var_display_max_data = 2048

这是 sublime text 项目的配置:

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "/home/user/repositories/example1"
        }
    ],
    "settings":
    {
        "default_encoding": "UTF-8",
        "fallback_encoding": "UTF-8",
        "xdebug":
        {
            "url": "http://example1/"
        }
    }
}

当我通过“工具”>“Xdebug”>“开始调试”(启动浏览器)开始调试时,它会打开一个包含以下内容的选项卡 URL:http://example1/?XDEBUG_SESSION_START=sublime.xdebug
但它不尊重我的断点,也没有在 Xdebug Stack、Contexto 和 Watch windows.
中显示任何内容 此外,我的应用程序中的任何其他链接都没有 xdebug 查询字符串。

我该如何解决这个问题?

我不得不在 php.ini 中将端口更改为 9500 并将其添加到 sublime text 项目的文件中:

...
"xdebug":
{
    "url": "http://example1/",
    "port": 9500
}
...

之后我关闭了 Sublime Text,重新启动了 nginx 和 php-fpm 然后再次尝试,终于一切正常了!