环境:
PHP-v7.4
Symfony-v4.1
流浪者-v2.2.7
家园-v9.5.1
VS代码
我的launch.json
文件配置:
{
"name": "Listen for myapp",
"type": "php",
"request": "launch",
"port": 9000,
"pathMappings": {
"/home/vagrant/code": "/home/user/code",
"/home/vagrant/code/myapp": "/home/user/code/myapp",
"/home/vagrant/code/myapp/public": "/home/user/code/myapp/public"
},
},
我的Homestead.yaml档案:
- map: myapp.test
to: /home/vagrant/code/myapp/public
type: symfony4
我的xdebug.ini配置(位于/etc/php/7.4/cli/conf.d/20-xdebug.ini):
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.idekey = VSCODE
当我运行时xdebugger(VSCode PHP 调试扩展),它显示
>Unable to open 'Dotenv.php': Unable to read file '/home/vagrant/code/myapp/vendor/symfony/dotenv/Dotenv.php' (Error: Unable to resolve non-existing file '/home/vagrant/code/myapp/vendor/symfony/dotenv/Dotenv.php').
任何人都可以提供任何指导吗?
更新 1:
它似乎无法阅读这一行本身:
(new Dotenv())->load(__DIR__.'/../.env');
.env文件具有权限644,我尝试将其更改为775并再次尝试但仍然遇到同样的问题。
.env和的位置Dotenv.php都是正确的,当前.env有权限644并且Dotenv.php有775。
aluckdog