【问题标题】:Debug a Symfony2 project with NetBeans and XDebug on Debian OS在 Debian OS 上使用 NetBeans 和 XDebug 调试 Symfony2 项目
【发布时间】:2016-11-09 18:05:59
【问题描述】:

我通常使用 PhpStorm,xdebug 设置简单明了。但现在我必须设置 NetBeans 才能使用 xdebug。我在 php.ini 文件中有如下配置:

[XDebug]

zend_extension=/usr/lib/php5/20131226/xdebug.so

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey=netbeans-xdebug

我还尝试将配置放在 xdebug.ini 文件中。但这并没有改变任何东西。 我如何配置 netbeans IDE:

  • 我已经检查了 Tools > Options > PHP > Debugging 中的 Stop at First LineShow Debugger Console
  • 我还右键单击了项目并打开了属性。
  • 我已经在 Sources 选项卡的项目中为 Web Root 设置了 symfony 项目的 web 文件夹。
  • 我已将 app_dev.php 文件设置为 运行配置 中的索引文件。

我已经设置了一个断点并启动了调试器,但它就是不想停止。我相信我的 xdebug 配置是正确的,因为我在 PhpStorm 中的调试没有任何问题。关于我错过了什么的任何建议?

提前致谢!

【问题讨论】:

    标签: php symfony netbeans debian xdebug


    【解决方案1】:

    这个配置确实有效。我只需要重新启动 NetBeans IDE。它有时会出现一些错误,需要重新启动才能重新开始工作。

    【讨论】:

      猜你喜欢
      • 2011-01-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-30
      • 1970-01-01
      • 2010-10-16
      • 2020-11-21
      • 2014-05-21
      相关资源
      最近更新 更多