首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >XDebug不是格式化错误

问XDebug不是格式化错误
EN

Stack Overflow用户
提问于 2011-10-15 21:14:48
回答 3查看 5.9K关注 0票数 5

我在Mac / XAMPP上安装了XDebug,并在phpinfo()中正确显示。但是这些错误的格式并不像以前那样(这些橙色的盒子看上去很清楚)。

一些值是正确设置的(出现在phpinfo()中):

  • display_errors : On
  • html_errors : On
  • xdebug.auto_trace : On

如果我将xdebug.show_exception_trace切换为On,我会看到XDebug添加的新信息格式正确.这只是基本的错误显示,其外观不变。然后,我假设XDebug已正确启动并运行。

编辑1:这是我的phpinfo的XDebug部分

​

编辑2:我有一个新的新鲜和干净的安装,在那里这个问题不再发生。

EN

回答 3

Stack Overflow用户

发布于 2013-02-17 12:03:00

这使它对我起作用:How to enable formatted Xdebug errors and traces

基本上,只需在html_errors = On中设置php.ini即可。

票数 7
EN

Stack Overflow用户

发布于 2011-10-16 09:34:54

xdebug.default_enable负责改进正常的错误显示--在您的情况下它是被激活的,所以它应该可以工作。

要测试它是否真正有效,请创建一个新的php脚本

代码语言:javascript
复制
trigger_error('foo');

看看能不能行。如果是这样,那么您的应用程序可能会更改该设置。

顺便说一句,auto_trace不会为这个问题改变任何东西。

票数 4
EN

Stack Overflow用户

发布于 2011-11-03 15:54:23

我注意到你说

错误的格式不像xdebug所用的那样

不是说内容是未格式化的。

我有一个格式化问题:我的页面的css对xdebug显示有影响!

因此,大量白色对白色产生奇怪的格式。

我在firefox profile/chrome/userContent.css中添加了一些规则

代码语言:javascript
复制
.xdebug-error {
  color: black;
  font-size: 14px;
}
.xdebug-error tr:first-child th {
  padding: 20px !important;
}
.xdebug-error tr:first-child th span {
  background: transparent !important;
  color: red !important;
  display: block !important;
  float: left !important;
  font-size: 50px !important;
  padding-right: 20px !important;
}
.xdebug-error tr:first-child th a {
  color: #fff !important;
}
.xdebug-error a {
  text-decoration: none;
}
.xdebug-error a:hover {
  text-decoration: underline;
}
.xdebug-error td {
  padding: 5px;
}

其中大多数都有效;不确定为什么:第一个子标记失败了< shrug >

祝好运!时间

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7780687

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档