php - xdebug 未捕获命令 php artisan test
问题描述
我正在努力解决以下行为:
如果我执行php ./vendor/bin/phpunit
Xdebug 将捕获我在 Visual Studio 代码中设置的任何断点。
否则,如果我执行php artisan test
断点将被绕过。
Ps:当我使用这两个命令时,XDebug 捕获了工匠的第一行文件,但我的测试文件(位于测试文件夹中)仅被php ./vendor/bin/phpunit
我在用着:
PHP 7.3.9.
Xdebug v2.9.0.
Laravel/framework: 7.0.
OS: Mac OS Catalina
Web Server: Mamp PRO
我的 XDEBUG 设置:
MAMP_Xdebug_MAMPzend_extension="/Applications/MAMP/bin/php/php7.3.9/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.idekey=VSCODE
xdebug.profiler_enable=1
xdebug.profiler_output_dir="/Applications/MAMP/tmp"
提前谢谢你。
解决方案
我认为您的命令行 PHP 不是来自 MAMP 的命令行。
Mac OS 安装了自己的版本。比较您的 MAMP 服务器的确切版本和您的 CLI 版本。
尝试 MAMP PHP 的完整路径:
/Applications/MAMP/bin/php/php7.3.9/bin/php artisan test
推荐阅读
- apache-spark - FileNotFoundException - delta_log 中缺少 checkpoint.parquet
- javascript - 更改具有相同类名的多个 iFrame
- annotations - 如何在openseadragon上绘制注释?
- reactjs - 使用 php yii v1.1 反应动态元标记
- npm - 关于 npm install 依赖版本选择的疑惑
- python - 使用 Airflow 的 PostgresHook 将大数据从 Postgres 表加载到 S3
- python - 无法为 Deepspeech 运行麦克风 VAD 流
- python - 熊猫以非固定周期移动行
- eclipse - Eclipse 4.14 的 SVN 插件
- ionic-framework - Ionic/Angular 5.0.1 global.scss 注释掉了,我该如何应用到我的应用程序?