php - jquery <pre> 调试崩溃

标签 php jquery pre

我使用的所有时间:

print'<pre>';
print_r($var);
print'</pre>';

调试 php。

我想推倒这棵树

[params] => JRegistry Object
                        (
                            [data:protected] => stdClass Object
                                (
                                    [show_title] => 
                                    [link_titles] => 
                                    [show_intro] => 

使用jquery

最佳答案

我使用Kint这非常好。要使用它,只需输入:

// shows name of variable, collapsible value and place you called it from
d(varname); 
/* pretty stack trace that lets me expand the source, and see 
   the parameters passed to the function; same is achieved via `d(1);` */
Kint::trace() 

屏幕截图:

Kint screenshot
(来源:github.io)

关于php - jquery <pre> 调试崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7907292/

相关文章:

php - 根据 Woocommerce 中的产品类别隐藏运输方式

javascript - 如何检测页面上的链接 PDF 并显示使用 jquery 下载 Adob​​e 阅读器的消息?

html - 如何使用 css 改变 <pre> 字体大小

php - 模型忽略主键属性

javascript - 无法使用键盘箭头滚动我的网站

jquery - 在 jquery 选择器中使用 rel 属性中的变量

html - Angular : how to nest templates inside <pre> tags?

html - 无法将样式应用于 safari 中的标签 pre

php - Codeigniter查询数组不显示第一条记录,但显示其他记录

javascript - jQuery ajax 工作但 axios 给出 CORS 错误