【发布时间】:2020-05-17 20:45:37
【问题描述】:
我正在与以下行为作斗争:
如果我执行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"
谢谢你。
【问题讨论】:
-
你的 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 laravel testing xdebug