php - 在 VSCode 中,我无法让 PHP 调试器正常运行
问题描述
我正在尝试为我的工作数据库创建一个新报告。尝试在 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)。
解决方案
推荐阅读
- javascript - JavaScript 标头和原型
- c - 如何做一个将文件中单词的第一个字符大写的 C 程序?
- java - Selenium Grid:“找不到此机器的非环回 ip4 地址”和“发生了非法反射访问操作”
- filesystems - 如何在具有 256KB 擦除扇区的闪存芯片上使用文件系统
- c# - 将大型数据集加载到网格视图 - UWP
- laravel - InvalidArgumentException 路由未定义
- python - Django 通用类视图模型更改
- xamarin.forms - 如何在 Xamarin.Forms 中更改条目光标颜色
- java - 内存中的 Java 原始数组布局
- reactjs - React - 更新状态数组