首页 > 解决方案 > Sublime text3 xdebug 远程服务器

问题描述

我正在尝试在我的远程服务器上设置 xdebug 以使用 sublime text3。我已经安装了 sublime text3 插件,在服务器上安装了 xdebug 并设置了 xdebug.ini 但它不起作用。有人可以向我解释这个过程吗?

我正在使用 sublime 的 ssh 插件将远程项目与本地同步,但我没有本地地址。

这是我的崇高 xdebug 用户设置

{
"debug_layout" : {
"cols": [0.0, 0.3, 1.0],
"rows": [0.0, 0.8, 1.0],
"cells": [[0, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2]]
},

// Group and index positions for debug views.
"context_index": 0,
"watch_index": 1,
"stack_index": 0,
"breakpoint_index": 1,

"breakpoint_group": 2,
"context_group": 1,
"stack_group": 2,
"watch_group": 1,

"path_mapping": {
"/path/on/server/project" : "/Users/user/my/local/project/"
},
"ide_key": "ls.xdebug"
}

还有我的 xdebug.inizend_extension=xdebug.so

zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 12.34.56.78 # this will be my address
xdebug.remote_log = /tmp/xdebug_remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9005

标签: sublimetext3xdebug

解决方案


如果它有用,这是我上次使用它时的项目文件:

{
    "folders":
    [
        {
            "follow_symlinks": true,
            "path": "/Users/antonis/Sites/demo"
        }
    ],
    "settings": {
        "xdebug": {
             "url": "http://localhost:5080/",
        }
    }
}

推荐阅读