- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我希望这里有人可以帮助我解决我的问题:
我最近进入了我的第一个 PHP 项目,需要设置调试。我知道很多人在我面前遇到过同样的问题,但我很难找到解决方案。
我需要使用 Xdebug 设置 PhpStorm,所有设置仍然无法正常工作,当我开始我的调试 session 时,我卡在了这里,没有更多信息:
这是我的项目设置:
带有 Xdebug 的 Docker Web 应用程序:0.0.0.0:80->80/tcp,0.0.0.0:443->443/tcp
PhpStorm PHP 调试设置:
来自 phpinfo()
的 Xdebug 设置:
在 PhpStorm 中监听调试连接已开启,启动调试 session 通过 GET 创建 session :https://localhost/?XDEBUG_SESSION_START=16957
但我的所有断点都被忽略了。
为了获取更多信息,我运行了 netstat
:
谁能告诉我这里缺少什么?
非常感谢您!
最佳答案
xdebug.remote_connect_back
,弊大于利,尤其是对于 Docker。xdebug.remote_host
不应该是 localhost
,这样,容器会尝试将调试数据发送给自己而不是主机机器。看来您使用的是 macOS 和适用于 Mac 的 Docker,在这种情况下,正确的主机名应该是 host.docker.internal
。在 PhpStorm 基础知识中展示 Docker 的博客文章:https://blog.jetbrains.com/phpstorm/2018/08/quickstart-with-docker-in-phpstorm/
关于php - 如何连接 PhpStorm 和 Xdebug,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62203607/
XDebug 无法打开远程调试文件 /var/log/xdebug/xdebug.log。 我尝试对文件 /var/log/xdebug/xdebug.log 授予 664 权限,但我现在所做的失败了
我正在尝试调试此代码: public function removeBlankLines() { $this->qp->find('br'); } // <-- break point
我正在尝试设置 Xdebug,因为我厌倦了使用 echoes 和 var_dumps。 我使用 Atom 作为我的 IDE 和 php-debug plugin . 我正在使用 laravel Hom
直到最近,我一直在用 PHP(通过 Notepad++)编写代码,并通过检查 IIS 中的日志进行调试(一定喜欢那个 Web 平台安装程序);从那时起,我决定更新到更高效的代码编写/测试环境,并在使用
当 XDebug 捕获错误时,是否可以在堆栈跟踪中显示文件的完整路径? 目前我刚刚得到这个: ../stack.php:47 但我宁愿看到这样的东西: C:\inetpub\wwwroot\mysit
xdebug ang php 的此消息的解决方法是什么? Xdebug: [Step Debug] Could not connect to debugging client. Tried: loca
PhpStorm 看不到 xdebug 但它已安装。在我的浏览器中 xdebug 工作正常。问题出在哪儿? 错误: Connection with 'xdebug' was not establish
昨天一切正常。今天我使用ctrl + F8添加断点并按ctrl + p,x d,不再有Xdebug Start Debugging(Launch Browser),只有Xdebug Start Deb
我有一个 OS-X 设置并使用 Netbeans IDE 进行 PHP 编程。我在以下路径中安装了 xdebug zend_extension="/Applications/MAMP/bin/php/
我无法让 XDebug 在 Windows 7 机器上与 PhpStorm 和 Vagrant 一起工作。我已经按照每个教程来让这个工作,但没有运气。 所以我试过的是: PhpStorm 始终监听调试
如果我通过设置xdebug.remote_enable=1来启用xdebug,apache服务器会变得非常慢;一旦我将设置更改为0,就正常了。 我在这里发现了同样的问题:XDebug really s
我已经搜索了很多关于 IntelliJ IDEA 12 和 xdebug.file_link_format 的信息。配置值。 我没有发现任何有用的东西...... 使用“idea”、“intellij
所以我试图让 sublime text 2 与 x-debug 一起运行我已经安装了 Kindari-SublimeXdebug 我有 wamp(我启用了 xdebug ) 这是 php.ini 配置
我对使用 Homebrew 不太熟悉,但我喜欢它。它是如此容易。我正在尝试安装 Xdebug。网络上的一些帖子说要这样做: brew install xdebug 但是这不起作用。我得到:错误,没有可
我用 High Sierra (10.13) 重新安装了我的 MacBook。它包含 Apache/2.4.27 和 PHP 7.1.7。 现在我想激活xdebug。请有人给我一些信息,该怎么做? 感
我不小心丢失了 /etc/php5/conf.d 文件夹中的 xdebug.ini 文件。当我尝试使用 apt-get 安装 xdebug 时,如何取回它,它给出如下注释。 Not replacing
我想在 Sublime Text 3 中更改 XDebug 插件的键绑定(bind)。如何更改 的键绑定(bind)运行 , 跳过 , 走进 , 走出 , ETC。? 最佳答案 这个答案更完整answ
当我写这条消息时浏览提示似乎这是一个棘手的问题,有各种补丁,但没有明确的答案......无论如何,我试试我的机会,就在这里。 我在 Ubuntu 10.04 上使用 Eclipse Helios PD
当我调试时,我想排除某些目录 - 例如,每次实例化一个类时,我的调试器都会进入 Doctrine 的 ClassLoader::loadClass() 这很烦人......我尝试添加那些我想排除的目录
我刚刚在OSX上安装了Xdebug v3.0.0beta1,并试图在PhpStorm 2020.1上使用它,但是我得到了: Xdebug: [Config] The setting 'xdebug.r
我是一名优秀的程序员,十分优秀!