我正在使用xdebug和我的php方法,如var_dump()很漂亮,但没有显示完整的信息,而转储以三个点结束,...这可能是继续的标志,然后是
(length=87749)
Run Code Online (Sandbox Code Playgroud)
我该怎么告诉xdebug显示完全转储?谢谢
PhpStorm无法看到xdebug但已安装.在我的浏览器中,xdebug工作正常.问题出在哪儿?
错误:
未建立与'xdebug'的连接.验证安装.
php.ini中
[xdebug]
xdebug.idekey=PHPSTORM
zend_extension="/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.default_enable=1
xdebug.coverage_enable=1
xdebug.profiler_enable = 1
xdebug.profiler_output_dir = "/tmp"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_autostart=1
Run Code Online (Sandbox Code Playgroud)
phpinfo 在phpstorm中:
PHP版本:5.4.10
Loaded extensions: bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imap, json, ldap, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tokenizer, XCache, xml, xmlreader, xmlwriter, xsl, yaz, zip, zlib
Run Code Online (Sandbox Code Playgroud) 你好我启用了Xdebug扩展,但是当我转储一个长数组(比如1000个位置)时,xdebug会压缩值...是否有可能关闭抑制,而不是Xdebug插件......
这里有一个例子给你们..
object(stdClass)[213]
public 'OrderGetByStatusResult' =>
object(stdClass)[214]
public 'OrderDTO' =>
array (size=3)
0 =>
object(stdClass)[215]
...
1 =>
object(stdClass)[230]
...
2 =>
object(stdClass)[266]
...
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用AES_ENCRYPT()编码密码来登录系统.但是在尝试实现这些代码时,我从xdebug得到了一些警告:
...
$key = 'd0gis=SUPER-cute';
$sql = "SELECT * FROM `users2` WHERE username = ? AND pwd = AES_ENCRYPT(?, ?)";
$stmt = $conn->stmt_init();
$stmt->prepare($sql);
$stmt->bind_param('sss', $username, $password, $key);
$stmt->execute();
$stmt->store_result();
...
Run Code Online (Sandbox Code Playgroud)
当调试器遇到第8行或第$stmt->prepare($sql);6 行时,来自xdebug的相同警告表说:
(!)警告:main():在第8行的D:\ xampp\htdocs\learnphp\includes\authenticate_mysqli.inc.php中不允许属性访问
错误属性$stmt是空的,我没有真正的问题,但我只是想知道是什么导致出现此警告消息.
用Google搜索此警告消息但未找到任何解决方案:
我有一个PHP脚本,在某一点上,我在另一个PHP脚本上调用exec().这非常正常,但在NetBeans中使用XDebug调试器时会挂起.这导致了各种各样的问题,因为我无法调试整个应用程序.
这是一个简单的例子:
test1.php
<?php
$output = array();
$status = 0;
exec('echo "Running inside test 1"', $output, $status);
exec('php ' . __DIR__ . '/test2.php', $output, $status); // Debugger hangs here
var_dump($output);
var_dump($status);
?>
Run Code Online (Sandbox Code Playgroud)
test2.php
<?php
echo "Running inside test 2" . PHP_EOL;
?>
Run Code Online (Sandbox Code Playgroud)
如果我运行 test1.php,它将运行完成并产生预期的输出.
如果我调试 test1.php,它会挂起exec('php ...')行.
我用shell_exec尝试了这个,并得到了同样的问题.我也尝试过对.sh文件或其他可执行文件的执行,没有任何问题.
起初我认为xdebug以某种方式附加到由exec启动的新PHP进程并锁定它,但我检查了我的php.ini并且有xdebug.remote_autostart=off.
我知道通过exec()调用PHP脚本是一种奇怪的处理方式; 它实际上是一个外部提供的PHAR文件,我们在实际的代码库中执行,但上面的小例子有相同的症状,所以我假设它是同样的问题.
如果它是相关的,我使用PHP 5.5.13,Xdebug 2.2.3,Netbeans 7.3.1,Ubuntu 12.0.4.
我在Ubuntu上的phpstorm上配置调试器.我很容易C:xampp/php在Windows上正确设置解释器的路径.但是linux应该有不同的解释路径.
我在这个网站上搜索了很多,也在谷歌搜索,但无法得到答案.什么应该是PHP的解释器路径,以便phpstorm识别它,从而我可以做调试?有什么遗漏?
谢谢.
我正在按照此说明验证Web服务器上的调试器配置.我使用的FTP连接已经过测试的远程服务器,但是我收到了这条警告信息
尽管服务器主机可能不是本地的,但远程主机配置为"localhost"
我的第一个问题是:"远程主机"和"服务器主机"分别指的是什么?
我知道远程主机是设置xdebug.remote_host,根据xdebug文档,它是"运行调试客户端的主机".
这让我感到困惑:调试客户端不是我在本地计算机上运行的IDE吗?
如果是,那么"调试客户端运行的主机"不应该是我本地机器的IP地址吗?如果是,我应该配置xdebug.remote_host为我的IP吗?
我尝试将它设置为我的IP,警告消息没有显示,但感觉不对,因为后来我尝试使用随机IP,消息也没有显示.
其次,xdebug文档还说xdebug.remote_host如果xdebug.remote_connect_back启用此设置将被忽略."虽然不太清楚这个设置是做什么的,但我把它设置为"On",如图所示:

我希望这会消除警告信息,但它仍然存在.那我怎么摆脱这个消息呢?
我有Xdebug,我可以停下来并逐步通过断点。但是它已经到达的变量不会显示在“变量”窗口中。看到图片-变量$test并且$test2不显示。
我在php.ini中的配置是
[XDebug]
zend_extension = /usr/lib/php/20170718/xdebug.so
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 10000
xdebug.remote_mode = req
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.idekey = "PHPSTORM"
Run Code Online (Sandbox Code Playgroud) 所以我在我的本地版本的PHP上启用了Xdebug,我想知道是否有人可以给我一个答案,为什么输出没有以默认方式设置(橙色背景,表格设计).我可以看到堆栈跟踪和所有内容,但它只是文本,消息周围没有html包装器.
如果您有任何建议,谢谢!
顺便说一句,这是在我的php.ini文件中:
zend_extension="C:\php\ext\php_xdebug.dll"
xdebug.show_local_vars=On
xdebug.dump.SERVER=*
xdebug.dump_globals=On
Run Code Online (Sandbox Code Playgroud) 我的 php.ini 配置:
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.mode = debug
xdebug.remote_autostart = on
xdebug.profiler_enable = on
xdebug.profiler_enable_trigger = on
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="c:/xampp/tmp"
xdebug.show_local_vars=0
xdebug.remote_host = 127.0.0.1
xdebug.remote_enable = 1
xdebug.remote_port = 9003
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=1
xdebug.remote_autostart=1
xdebug.idekey=PHPSTORM
xdebug.remote_log="c:/xampp/tmp/xdebug.log"
Run Code Online (Sandbox Code Playgroud)
我的 launch.json 配置:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug", …Run Code Online (Sandbox Code Playgroud)