I'm using PHP with Xdebug. Yesterday everything is OK but today I have one problem: My Chrome Developer tools cannot show the HTML which formatted by Xdebug, all lines are combined to one line.
The RAW HTML in Network->Response
tab is something like this:
<pre class='xdebug-var-dump' dir='ltr'>
<small>C:\wamp\Debug.php:68:</small>
<b>array</b> <i>(size=18)</i>
'name' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'abc'</font> <i>(length=56)</i>
'img' <font color='#888a85'>=></font> <small>string</small> <font color='#cc0000'>'http://product.net/1000169499.jpg'</font> <i>(length=69)</i>
</pre>
I have tested by http://htmledit.squarefree.com/ and it shows normally but in Network->Preview
displays:
Respone Headers is Content-Type:text/html; charset=UTF-8
I'm using Chrome Version 61.0.3163.79 (Official Build) (64-bit).
How to resolve this problem?
答案 0 :(得分:2)
我在Chrome团队中创建了bug
答案 1 :(得分:1)
我发现你的变量之间需要<pre></pre>
。我创建了一个片段来代替'vardump':
foreach ($variable as $key => $reg) {
echo "<pre>{$key} => '{$reg}'</pre>";
}
var_dump($variable);die;
Ps:我正在用最后一个var_dump重复数据以获取文件名和行
请告诉我这是否会对您有所帮助。
答案 2 :(得分:0)
我在ubuntu linux上使用chrome版本61.0.3163.79遇到同样的问题。
我切换到铬浏览器版本60.0.3112.113并且xdebug输出正常。
我认为这是一个Chrome版本问题。
答案 3 :(得分:0)
Bug已修复。在版本70.0.3538.77(官方版本)(64位)上测试