在VSCode I';我无法使PHP调试器正常运行

在VSCode I';我无法使PHP调试器正常运行,php,windows,visual-studio-code,xdebug,unc,Php,Windows,Visual Studio Code,Xdebug,Unc,我正在尝试为我的工作数据库创建新报告。 正在尝试在Windows 10上的VSCode中调试PHP,并在本地计算机上运行XAMPP。 该站点位于vue.js中,带有连接mysql 5.7数据库的php api。我在\khcc2\NETFOLDERS\UserName\htdocs\crm中为crm使用npm运行dev,需要调试report.class.php api 在php.ini中 [XDebug] zend_extension = C:\tempx\xampp\php\ex

我正在尝试为我的工作数据库创建新报告。 正在尝试在Windows 10上的VSCode中调试PHP,并在本地计算机上运行XAMPP。 该站点位于vue.js中,带有连接mysql 5.7数据库的php api。我在\khcc2\NETFOLDERS\UserName\htdocs\crm中为crm使用npm运行dev,需要调试report.class.php api

在php.ini中

    [XDebug]
    zend_extension = C:\tempx\xampp\php\ext\php_xdebug-2.7.1-7.3-vc15-x86_64.dll
    xdebug.remote_enable = 1
    xdebug.remote_autostart = 1
    xdebug.remote_host = localhost
    xdebug.idekey = "vscode"
    xdebug.remote_port = 9000
在api中,我有launch.json

"configurations": [
    {
        "name": "Listen for XDebug",
        "type": "php",
        "request": "launch",
        "port": 9000,
    }
我已尝试向launch.json中添加以下各项(不是一次添加全部):

我得到:
无法打开“index.php”:找不到文件(file:///h:/htdocs/api/NETFOLDERS/UserName/htdocs/api/index.php).

您正在尝试调试命令行脚本吗?如果是,默认值(
“cwd”:“${fileDirname}”
)是否有效?否则,您使用了错误的配置,它是
“侦听XDebug”
您真正想要的(而不是
“启动当前打开的脚本”
)。是的,由于站点是在npm中启动的,我必须侦听它。但它似乎总是检查错误的位置。我的h:驱动器指向\\khcc2\netfolders\username\。我认为我需要cwd,因为它正在寻找错误的位置。如果没有cwd,我将无法打开“index.php”:找不到文件(file:///NETFOLDERS/username/htdocs/api/index.php)。您的意思是从节点启动命令行脚本(例如使用)?是否正在设置
XDEBUG\u CONFIG
环境变量?编辑问题以添加详细信息
    "cwd": "\\\\khcc2\\NETFOLDERS\\UserName\\htdocs\\api",
    "cwd": "h:\\htdocs\\api",
    "cwd": "${workspaceRoot}",