我正在尝试以下行为:
If I execute php ./vendor/bin/phpunit
Xdebug will caught any breakpoint I set in the Visual Studio Code.
Otherwise, If I execute php artisan test
breakpoints are bypassed.
Ps: XDebug caught the artisan's first line file when I'm using both commands but my test files ( that are in the tests folder) are caught only by 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路径: