在VSCode中,我无法正常运行PHP调试器

时间:2019-09-10 16:51:57

标签: 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 run 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中:

    "cwd": "\\\\khcc2\\NETFOLDERS\\UserName\\htdocs\\api",
    "cwd": "h:\\htdocs\\api",
    "cwd": "${workspaceRoot}",

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

0 个答案:

没有答案