javascript 如何读取和调试压缩的javascript文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6763851/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 21:46:43  来源:igfitidea点击:

How to read and debug the compressed javascript file?

javascriptminifyminimize

提问by Xiaolong

I saw an interesting js file in a website, but i cannot read it because it is minimized. Is there any service or method to convert it to a readable file?

我在一个网站上看到一个有趣的 js 文件,但我无法阅读它,因为它被最小化了。是否有任何服务或方法可以将其转换为可读文件?

The minimized js file is similar to the compiled output from Google Closure Compiler.

最小化的 js 文件类似于Google Closure Compiler的编译输出。

回答by SLaks

回答by Alex Objelean

There is also a similar feature provided by UglifyJswhich has an option for beautifying the code:

UglifyJs也提供了一个类似的功能,它有一个美化代码的选项: