我无法让xdebug在Ubuntu 12.10和PHP5.4下的PhpStorm上工作 在我看来,一切都已启用,但 IDE 不会在断点处停止。下面是相关参数。
有人可以查看参数以了解我缺少什么吗?我想知道 xdebug.remote_enable 是否需要打开。我正在调试本地文件。服务器根路径和项目路径相同。
如果我确实需要更改 PHP54 xdebug 参数,我到底应该在 ubuntu 中哪里做呢?
我将以下内容添加到/etc/php5/apache2/php.ini,重新启动apache,但它们似乎被忽略。
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_host="localhost"
Run Code Online (Sandbox Code Playgroud)
php-i 输出
/etc/php5/cli/conf.d/20-xdebug.ini
xdebug
xdebug support => enabled
xdebug.auto_trace => Off => Off
xdebug.cli_color => 0 => 0
xdebug.collect_assignments => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 0 => 0
xdebug.collect_return => Off => Off
xdebug.collect_vars => Off => Off
xdebug.coverage_enable => On => On
xdebug.default_enable => On => On
xdebug.dump.COOKIE …Run Code Online (Sandbox Code Playgroud) xdebug 的红色和黄色标准颜色在几个小时后会伤害你的眼睛。
http://www.designified.com/blog/article/76/restyling-xdebug-output描述了如何用需要jquery的javascript替换样式。
我一直在寻找一种更直接的方法,终于找到了一种。
我配置了 phpstorm-xdebug,并且能够使用断点调试我的代码。这些天我更新了 php(通过brew)和 xdebug,现在我有 php 5.5.26 和 xdebug 2.3.3。当我尝试调试测试(和代码)时,phpstorm 告诉我:“未建立与 xdebug 的连接”。
我已经检查了 php.ini 中 xdebug 的配置,如下
[xdebug]
zend_extension="/usr/local/opt/php55-xdebug/xdebug.so"
xdebug.remote_enable=1
xdebug.profiler_enable=1
xdebug.remote_port=9000
xdebug.remote_host=127.0.0.1
xdebug.idekey=PHPSTORM
Run Code Online (Sandbox Code Playgroud)
网络服务器调试验证说

我尝试使用不同版本的 phpstorm,卸载并重新安装 php55/php55-xdebug,但没有成功。
您知道如何解决这个问题吗?
X debug 将输出作为部分而不是一个文件返回。我正在使用 ubuntu 16,不知道为什么突然输出在几个文件中。我遇到的问题是我无法在 Kcachegrind 中打开这些文件,因为输出在单独的文件中有不同的部分。任何人?提前致谢
我一直在使用 ddev 处理我的 Drupal 项目,现在想使用 xdebug,所以我可以使用 PhpStorm 进行逐步调试(或者任何 IDE 都可以)。但我似乎无法让它在断点处停止。我试图按照ddev docs 中的说明进行操作,但这并不能让我继续前进,而且我不知道下一步该做什么。我做了:
xdebug_enabled: true和ddev start(并使用 phpinfo 检查以查看 xdebug 是否已启用。)问题是单元测试仅限于由“apache”用户运行,我从命令行运行它们的方式是:
sudo -u apache phpunit tests/EmailFunctionsLargeTest.php --stop-on-failure
它有效,但是如何sudo -u apache phpunit在使用 PhpStorm 时模拟?
聚苯乙烯
PhpStorm 以流浪用户身份运行测试...
我已经安装了 Xdebug,但在phpinfo()输出中找不到它。
我根据https://xdebug.org/wizard.php 操作:
量身定制的安装说明摘要
Xdebug installed: no
Server API: FPM/FastCGI
Windows: no
Zend Server: no
PHP Version: 7.2.14-1
Zend API nr: 320170718
PHP API nr: 20170718
Debug Build: no
Thread Safe Build: no
OPcache Loaded: no
Configuration File Path: /etc/php/7.2/fpm
Configuration File: /etc/php/7.2/fpm/php.ini
Extensions directory: /usr/lib/php/20170718
Run Code Online (Sandbox Code Playgroud)
指示
Download xdebug-2.7.0.tgz
Install the pre-requisites for compiling PHP extensions.
On your Ubuntu system, install them with: apt-get install php-dev autoconf automake
Unpack the downloaded file with tar -xvzf …Run Code Online (Sandbox Code Playgroud) 我有 httpd 2.4.38 win64 VC11 和旧的 PHP 5.6.4 Win32 VC11 x64。我想安装 Xdebug 但出现错误:
Failed loading C:/laragon/bin/php/php-5.6.0-Win32-VC11-x64/ext\php_xdebug-2.5.5-5.6-vc11-nts-x86_64
Run Code Online (Sandbox Code Playgroud)
我的 php.ini
[xdebug]
zend_extension = "C:\laragon\bin\php\php-5.6.4-Win32-VC11-x64\ext\php_xdebug-2.5.5-5.6-vc11-nts-x86_64.dll"
xdebug.remote_enable=1
xdebug.remote_connect_back=On
xdebug.remote_port="9000"
xdebug.profiler_enable=0
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
Run Code Online (Sandbox Code Playgroud)
我不明白这个错误,因为在我看来,我有一个很好的 Apache、PHP 版本,当然还有 Xdebug。问题出在哪儿?
我一整天都在努力让 xdebug 工作。我已经尝试完全重新安装自制软件,清除 php 并安装最新版本,重新安装 apache(如下:https : //getgrav.org/blog/macos-catalina-apache-multiple-php-versions),现在尝试使用 pecl 以及从源 xdebug 安装,我继续收到错误。尝试通过 pecl 安装:
sudo pecl install xdebug
Password:
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in Validator.php on line 1933
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/local/pear/share/pear/PEAR/PackageFile/v2/Validator.php on line 1933
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
Cannot install, php_dir for channel "pecl.php.net" …Run Code Online (Sandbox Code Playgroud) 我希望这里有人可以帮助我解决我的问题:
我最近进入了我的第一个 PHP 项目,需要设置调试。我知道很多人在我之前也遇到过同样的问题,但我很难找到解决方案。
我需要使用 Xdebug 设置 PhpStorm 并且所有设置仍然无法正常工作,当我开始调试会话时,我陷入困境,没有更多信息:
这是我的项目设置:
带有 Xdebug 的 Docker Webapp:0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp
PhpStorm PHP 调试设置:
Xdebug 设置来自phpinfo():
在 PhpStorm 中侦听调试连接已开启,启动调试会话通过 GET 创建会话:https://localhost/?XDEBUG_SESSION_START=16957但我所有的断点都被忽略。
试图获得更多信息我跑了netstat:
谁能告诉我我在这里缺少什么?
非常感谢您提前!