Draw.io : How can I debug unminified js code?

ε祈祈猫儿з 提交于 2019-12-11 02:09:15

问题


I downloaded draw.io source files from the github repository and tried to make some minor changes to the import function, but all the sources are minified (especially app.min.js). So my question is this: is there any way to debug the code with the unminified sources? Also I tried to pass inside the query string the param dev=1, but it gives some errors and doesn't manage to load.

I already saw the post Draw.io — Is there non-minified source? but I don't know how to build draw.io.


回答1:


If you know the function that you need to edit you can use https://unminify.com to reverse the spacing minification but the variable and function names will still be simplified making it difficult (but not impossible) to edit.




回答2:


I've found, in my opinon, a strange solution. I took build.xml file and replaced all the <jscomp> instructions with <concat> so the result file isn't a minification but just a merge of all source files.

This method works just fine and it solves my problem but i don't know if there is a simpler and more right method.



来源:https://stackoverflow.com/questions/56026571/draw-io-how-can-i-debug-unminified-js-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!