我在Debian的shell中使用PhpStorm + Xdebug + PHPUnit。工作正常,但有一个奇怪的行为,主要是无聊。
当我在shell中运行phpunit
命令时,PhpStorm显示给我的第一个中断是在/usr/local/bin/phpunit
中检查php版本的行中…
但是显然我没有在文件中设置任何断点
if (version_compare('5.6.0', PHP_VERSION, '>')) {
fwrite(
STDERR,
'This version of PHPUnit requires PHP 5.6; using the latest version of PHP is highly recommended.' . PHP_EOL
);
die(1);
}
此外,该文件非常大,因此在您可以继续执行之前,它会被阻塞几秒钟。
任何建议吗?
确保未选中Run | Break at first line in PHP scripts
。
但很可能在这里不起作用。如果是这样:
-
Setting/Preferences | Languages & Frameworks | PHP | Debug
- 取消选中
Force break at the first line when a script is outside the project
选项—根据您的描述,此选项负责此行为。