【问题标题】:Xdebug can debug codeception but not codeception testsXdebug 可以调试 codeception 但不能调试 codeception 测试
【发布时间】:2016-04-19 23:31:02
【问题描述】:

我正在 Symfony2 项目中运行 Codeception 测试,并且正在 PHPstorm 中进行开发。

调试 codeception 过去可以工作,但我最近开始了一个新项目,它不再起作用了。一切都按应有的方式配置。当我设置 phpstorm 开始监听连接时,我在 bin/codecept 中设置了一个断点。调试器在断点处停止(应该如此)。

但是当我在一个测试中设置断点(这是明确运行的)时,我得到了消息

16:10:41 Debug session was finished without being paused
         It may be caused by path mappings misconfiguration or not synchronized local and remote projects.
         To figure out the problem check path mappings configuration for 'null' server at PHP|Servers or enable Break at first line in PHP scripts option (from Run menu).
         Do not show again (show balloon)

我确实认为路径映射出了点问题,因为我的服务器在符号链接上运行,但为什么调试应用程序/控制台和代码接收本身可以工作,而不是测试?

【问题讨论】:

    标签: symfony xdebug codeception


    【解决方案1】:

    可能是因为这个:

    https://github.com/Codeception/Codeception/issues/1636#issuecomment-71205765

    测试不是直接执行的,是通过反射触发的。

    【讨论】:

    • 我只能建议一个解决方法 - 在您要调试的辅助方法中放置一个断点。
    • 确实有效,这对我有很大帮助!太奇怪了,测试本身没有受到影响。
    • 天哪!我发现了问题。我将我的测试文件夹重命名为测试,我在代码/Library/WebServer/Documents//src/AppBundle/tests/unit/Form/MenteeTypeTest.php 中看到了这一点,因此文件夹名称由于某种原因不同步。非常感谢
    猜你喜欢
    • 2013-09-07
    • 2013-06-10
    • 1970-01-01
    • 2013-09-04
    • 1970-01-01
    • 2014-01-27
    • 1970-01-01
    • 1970-01-01
    • 2014-10-20
    相关资源
    最近更新 更多