【发布时间】:2016-12-14 08:54:50
【问题描述】:
我在 Debian 的 shell 中使用 PhpStorm + Xdebug + PHPUnit。 工作正常,但有一个奇怪的行为,主要是无聊。
当我在 shell 中运行 phpunit 命令时,PhpStorm 向我显示的第一个中断是在检查 php 版本的行中的 /usr/local/bin/phpunit...
但显然我没有在该文件中放置任何断点。
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...选项——很可能第二个正在这样做。 -
@LazyOne 谢谢。我没有选中“当脚本在项目之外时在第一行强制中断”,现在可以正常工作了。
-
感谢大家的帮助,成功了!真是个烦人的选择。
标签: php shell phpunit phpstorm xdebug