【问题标题】:Debug php in NetBeans在 NetBeans 中调试 php
【发布时间】:2020-04-04 22:04:38
【问题描述】:

我只是想在 netbeans 中调试 php 代码以了解如何操作,我已经安装了 google chrome netbeans 扩展,但是当我尝试调试我的代码时,一个窗口显示:

"netbeans 连接器 chrome 扩展是必需的
要使用 NetBeans 连接器在 Chrome 中运行您的项目,您必须首先在 Chrome 网上应用店中安装 NetBeans 连接器扩展。"

另外,我在本地主机中打开了我的项目,当然我可以在 chrome 页面的一角看到 netbeans 图标。
谁能告诉我我做错了什么?

我的操作系统是 ubuntu 18.04
我的堆栈是 xampp (lampp)

【问题讨论】:

    标签: php debugging netbeans backend lamp


    【解决方案1】:

    一种在Netbeans中调试php的方法(无chrome扩展):

    1. Apache 服务器正在运行
    2. PHP 已配置
    3. 安装 php-xdebug
    4. 在你的 php.ini 中添加:

      zend_extension=/usr/lib/php/... 到 .../xdebug.so 的路径

      xdebug.remote_enable = 1

      xdebug.remote_handler = dbgp

      xdebug.remote_host = 127.0.0.1

      xdebug.remote_mode = req

      xdebug.remote_port = 9005

    在 Netbeans 中转到工具 > 选项 > PHP

    标签常规

    • 写下你的 PHP 解释器路径

    标签调试

    • 调试器端口:9000
    • 会话 ID:netbeans-xdebug

    【讨论】:

      猜你喜欢
      • 2014-05-21
      • 1970-01-01
      • 2011-07-28
      • 2011-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-17
      • 2014-09-25
      相关资源
      最近更新 更多