PHPUnit + Xdebug + PhpStorm的奇怪行为

时间:2016-08-08 14:16:58

标签: php shell phpunit phpstorm xdebug

我在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);
}

此外,该文件非常大,因此在您继续操作前几秒钟仍会被阻止。

有什么建议吗?

1 个答案:

答案 0 :(得分:2)

确保取消选中Run | Break at first line in PHP scripts

但很可能在这里没有帮助。如果是这样的话:

  1. Setting/Preferences | Languages & Frameworks | PHP | Debug
  2. 取消选中Force break at the first line when a script is outside the project选项 - 根据您的说明,此人应对此行为负责。
相关问题