我试图在mamp pro上设置xdebug但没有成功.我在互联网上搜索,没有任何帮助我.
首先,我试图在php.ini中取消注释以下行:
的zend_extension = "/应用程序/ MAMP /斌/ PHP/php5.4.4/lib中/ PHP /分机/无调试非ZTS-20100525/xdebug.so"
接下来,我尝试了向导:http: //xdebug.org/wizard.php
接下来,我尝试将这些行添加到php.ini:
xdebug.default_enable = 1
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host =本地主机
xdebug.remote_port = 9000
xdebug.remote_autostart = 1
什么都没有帮助.我在phpinfo中看不到xdebug.
MAMP PRO版本:2.1.1
PHP版本:PHP 5.4.4
谢谢!
我qcachegrind用来查看由创建的配置文件日志Xdebug.我可以很好地查看文件,但我不知道我在看什么.
我已经尝试了谷歌,但我只是不断获得安装教程,没有关于如何理解显示器.
(请在新标签页中打开图片以获得更好的视图)
Xdebug 已更新到版本 3,目前当我运行时它将安装在最新版本中
pecl install xdebug
Run Code Online (Sandbox Code Playgroud)
这破坏了 Dockerfile 和 XDebug 设置。虽然我计划从长远来看升级到 xdebug@3,但我现在想强制安装 xdebug 2.9。我怎样才能做到这一点?
我尝试做
pecl install xdebug@2
Run Code Online (Sandbox Code Playgroud)
和类似的方法。
如何列出软件包的所有版本以及如何使用 pecl 强制安装特定版本?
我目前正在尝试让Xdebug在我们的开发服务器上工作.作为客户端我使用netbeans和连接到目前为止工作没有问题.但是当我尝试在netbeans中设置一个断点时,它就会被忽略.
是的,我已经谷歌搜索了几个小时,并在这里找到了一些完全符合我描述的问题: SO 1 SO 2
但这似乎并没有为我解决.该Xdebug模块通过zend_extension = path/to/xdebug加载.所以在
/etc/php5/conf.d/xdebug.ini
我还查看了php5/apache和php5/cli php.ini以确保它没有加载extension = somewhere那里.我还检查了phpinfo()找到的"解析的其他.ini文件",似乎没有其他地方加载.
通过执行php -m我可以看到加载的Xdebug模块
[PHP Modules]
并在
[Zend Modules]
不确定这是否表明它仍然被加载两次或者它是否正常?如果我zend_extension=/path/to/xdebug.so从conf.d/xdebug.ini它删除它仍然不再加载.所以我真的认为它只是装在那里.
如果我设置了remote_log选项,则看到Netbeans正在尝试设置某些内容:
<- breakpoint_set -i 452 -t line -s enabled
-f file:///http:/development.xxx.de/users/itsame/index.php -n 15
-> <response xmlns="urn:debugger_protocol_v1"
xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set"
transaction_id="452" state="enabled" id="258870001">
</response>
Run Code Online (Sandbox Code Playgroud)
但它似乎没有任何效果(看起来几乎和我上面发布的其他SO问题一样.但是如果我在php代码中做了一个手动xdebug_break(),它就会正确地处理它.
PHP版本是5.2.6,Xdebug是2.1.我有什么建议可以看看下一个吗?
我最近在我的ststem上安装了xdebug,并希望将xdebug.var_display_max_depth从3增加到10.我怎样才能这样做?
我想通过以下软件配置进行远程调试:
Win 7 Pro 64位WAMP Server 2.2(32位)包括.Apache 2.2.22,PHP 5.4.3,XDebug php_xdebug-2.2.1-5.4-vc9.dll JetBrains PHPStorm 4.0.3
1.)WAMP启动并运行,我的站点可以在localhost/fox /下找到
2.)PHP Storm有一个项目,我的源文件和apache别名localhost/fox之间有一个映射
2.)我安装了php扩展XDebug并将以下行添加到我的php.ini中
[xdebug]
zend_extension="c:/wamp/bin/php/php5.4.3/zend_ext/php_xdebug-2.2.1-5.4-vc9.dll"
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_connect_back=On
xdebug.remote_autostart=On
xdebug.profiler_enable=On
xdebug.profiler_enable_trigger=off
xdebug.profiler_output_name=cachegrind.out.%t.%p
xdebug.profiler_output_dir="c:/wamp/tmp"
xdebug.remote_log="C:/wamp/tmp/xdebug.log"
xdebug.remote_cookie_expire_time=6000
Run Code Online (Sandbox Code Playgroud)
这应该配置远程调试XDebug和回调地址.
我在这里检查了我的安装:xdebug.org/wizard.php
3.)我配置了phpstorm,首先我添加了本地服务器
然后在这里检查我的设置
http://www.bilder-hochladen.net/files/jrn0-2-c81e-jpg-nb.html
(我也试过127.0.0.1/fox作为服务器地址,而不是localhost)
我的调试设置:http: //www.bilder-hochladen.net/files/jrn0-1-c4ca-jpg.html
现在我重启我的apache,我进入phpstorm,设置一个断点(它是红色的),点击该功能
Run -> Start listen to PHP Debug Connections
Run Code Online (Sandbox Code Playgroud)
电话接收器正在变成绿色,这究竟是什么意思,但它对我来说是一个正面的信号.
当我现在在本地webserver absolutley上运行我的php脚本没有任何反应时,程序运行在断点上并且不会停止.
在Xdebuggers日志(C:/wamp/tmp/xdebug.log)中,我发现这些消息的负载如下:
I: Checking remote connect back address.
I: Remote address found, connecting to ::1:9000.
E: Could not connect to client. :-(
Log closed at 2012-07-19 14:21:08
Run Code Online (Sandbox Code Playgroud)
在互联网的某个地方,我发现了暗示,Windows防火墙可以阻止通信,所以我把它关闭了完整但但没有帮助. …
我正在编写一个加载YAML文件的PHP CLI应用程序.尝试在xDebug会话中执行此操作时:
if (file_exists(__DIR__ . '/../../foo/bar')
{
/* ... */
}
Run Code Online (Sandbox Code Playgroud)
__DIR__永诺是xdebug:这将导致百达至false从file_exists().
有什么工作吗?
我将 Visual Studio Code 1.16.1 与 Felix Becker 的PHP Debug 扩展一起使用。我连接到 XDebug 就好了,可以在调试窗格中设置断点和查看变量,没有任何问题。
但是,调试控制台似乎没什么用,我只能运行超级基本的 PHP 命令,而且我似乎无法评估正常的 PHP 命令或与我的应用程序很好地交互。
error evaluating code尝试在调试控制台中键入任何 PHP 语句或表达式时,我始终如一。似乎我所能做的就是声明变量、数组和对象。
我不能声明的类,函数,使用控制结构(if,foreach等)。
作品:
$x = 4
//4
$x
//4
$x = new stdClass();
//stdClass
$x = [];
//array(0)
($x) ? yes : no
// yes
(!$x) ? yes : no
// no
preg_replace('/dog/', 'cat', 'The quick brown fox jumps over the lazy dog.')
// "The quick brown fox jumps over the …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用VSCode调试在Docker上运行的PHP应用程序,但没有成功.
在过去,我能够使用运行WAMP Server的VSCode轻松调试我的PHP应用程序,但自从我开始使用Docker后,我无法进行调试工作.在线搜索了几个教程,在StackOverflow上检查了一些线程(例如:Docker和XDebug没有读取断点VSCode),但我仍然无法使其正常工作.
Dockerfile:
FROM php:7.1.8-apache
COPY /cms /srv/app/cms
COPY .docker/cms/vhosts/vhost.conf /etc/apache2/sites-available/cms.conf
COPY .docker/cms/vhosts/vhost-ssl.conf /etc/apache2/sites-available/cms-ssl.conf
COPY .docker/cms/vhosts/certificate.conf /etc/ssl/certs/certificate.conf
COPY .docker/cms/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
WORKDIR /srv/app/cms
RUN docker-php-ext-install mbstring pdo pdo_mysql
RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
RUN chown -R www-data:www-data /srv/app/cms
RUN openssl req -x509 -new -out /etc/ssl/certs/ssl-cert-cms.crt -config /etc/ssl/certs/certificate.conf
RUN a2ensite cms.conf
RUN a2ensite cms-ssl.conf
RUN a2enmod rewrite
RUN a2enmod ssl
Run Code Online (Sandbox Code Playgroud)
xdebug.ini
[xdebug]
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_connect_back=0
xdebug.remote_host='host.docker.internal'
xdebug.idekey='VSCODE'
xdebug.remote_autostart=1
Run Code Online (Sandbox Code Playgroud)
泊坞窗,compose.yml
version: '3.7'
services:
cms:
build:
context: . …Run Code Online (Sandbox Code Playgroud)