【问题标题】:How to show codecept_debug messages when debugging project unit tests in PhpStorm?在 PhpStorm 中调试项目单元测试时如何显示 codecept_debug 消息?
【发布时间】:2017-11-29 09:24:17
【问题描述】:

当通过 PhpStorm 运行单元测试时,函数 codecept_debug 的输出被忽略。

我已将我的测试运行器选项设置为:

--colors --debug -v

在我的codeception.yml我也有:

settings:
    bootstrap: _bootstrap.php
    colors: true
    debug: true
    memory_limit: 1024M

在命令行上codecept_debug的输出显示

【问题讨论】:

  • 我上次检查时,它不能这样做。

标签: unit-testing phpstorm codeception


【解决方案1】:

尚未实施:https://youtrack.jetbrains.com/issue/WI-36233。请投票/评论问题

【讨论】:

  • 不是我期望的答案:) 希望他们能解决它。
【解决方案2】:

目前 PHPStorm 仍不支持此功能,但您可以通过以下方式解决此问题:

  • 将您的 codecept_debug( $variable ) 呼叫更改为 echo print_r( $variable, true );

以与codecept_debug 相同的方式运行测试时,输出应显示在 PHPStorm 的终端上。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-10
    • 1970-01-01
    相关资源
    最近更新 更多