【问题标题】:XDebug with PHP UnitXDebug 与 PHP 单元
【发布时间】:2015-04-22 15:23:13
【问题描述】:

我正在尝试让 XDebug 与 PHP 单元一起工作。我在 OSX 上使用 PhpStorm。

这是我的方法:我获取了 phpunit shell 脚本的内容,并在 /usr/local/bin 中创建了一个名为 php-xdebug 的新文件。在该文件中,我添加了 xdebug 的配置标志。不用说,我无法在 IDE 中达到断点,否则我不会发布此消息。

这里是php-xdebug的内容:

#!/usr/bin/env bash

/usr/bin/env php -d xdebug.idekey=PHPSTORM -d xdebug.remote_enable=1 -d xdebug.remote_port=9000 -d xdebug.remote_host=localhost -d xdebug.remote_autostart=1 -d allow_url_fopen=On -d detect_unicode=Off /usr/local/Cellar/phpunit/4.3.4/libexec/phpunit-4.3.4.phar $*

非常感谢任何帮助。

【问题讨论】:

    标签: php unit-testing phpunit phpstorm xdebug


    【解决方案1】:

    必须使用 zend_extension 加载扩展。

    【讨论】:

    • 如有疑问,XDebug 页面有一个部分供您发布您的 PHP.INI,它会标记您需要的更改。 xdebug.org/wizard.php
    猜你喜欢
    • 1970-01-01
    • 2021-05-02
    • 2018-03-17
    • 2012-05-17
    • 2012-06-03
    • 2014-12-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多