Debugging JavaScript events with Firebug

后端 未结 8 1092
情话喂你
情话喂你 2020-12-24 02:31

I need to set a breakpoint to certain event, but I don\'t know, where is it defined, because I\'ve got giant bunch of minimized JavaScript code, so I can\'t find it manually

8条回答
  •  佛祖请我去吃肉
    2020-12-24 03:10

    What you could do is get the minified code - you will have access to this. De-minify the code as per Crescent Fresh's (1) option or any method you prefer.

    Then download and install Fiddler - all web devs should have this incredible tool installed.

    Then using Fiddler you can intercept the browser's call for the minified.js file with the local unminified.js you have on your local drive.

    Fiddler basically intercepts your browser's request for a specific file and can serve up a different file to your browser. So you can now look at un-minified code.

    Easy.

    Another option is to use Firefox and get the Venkman debugger installed on it - far better than Firebug IMHO - and the Venkman debugger has a "pretty print" option which can visually un-minify the minified code at run time. Stick your break point wherever you want now...

提交回复
热议问题