Chrome开发人员工具中的人类可读的javascripts [英] Human readable javascripts in chrome developer tools

查看:142
本文介绍了Chrome开发人员工具中的人类可读的javascripts的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道Chrome开发者工具是否可以将javascripts格式化为人类可读形式?某种美化会很方便。假设我正在使用一些JS库,我需要实例化它的对象,这样我就应该知道将什么放入构造函数中。但是在Chrome开发者工具用户界面中搜索这个包含4行的巨大库是非常烦人的...

does anybody know whether Chrome Developer Tools can format javascripts into human readable form ? Some kind of beautifier would be handy. Let say that I'm using some JS library and I need to instantiate its object, so that I should know what to put into constructor. But searching through this huge library that has 4 lines in the Chrome Developer Tools user interface is quite annoying...

否则服务器端需要负责实施开发模式提供未缩小的javascript文件...

Otherwise the server side needs to take care of implementing "dev mode" that supplies javascript files that are not minified ...

推荐答案

某些浏览器有漂亮的打印按钮,看起来像 {} ,它出现在HTML,JS和/或CSS中,具体取决于浏览器。

Some browsers have a Pretty print button that looks like this {} and it appears for HTML, JS, and/or CSS depending on the browser.

Chrome将其添加到来源标签中:

Chrome has it in the in the Sources tab:

Firefox在调试器标签中显示

Firefox has it in the in the Debugger tab

这些按钮的位置可能会改变,但它应该总是在那里

这篇关于Chrome开发人员工具中的人类可读的javascripts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆