Is there a way to consolidate a webpage's embedded javascript in the debugger?

12 views Asked by At

To get dynamically loaded javascript to show in the web browser's debugger, you can add a line like this to your source file:

//# sourceURL=filename.js

Some of my projects use template fragments that contain their own embedded javascript, so the generated document ends up with pockets of javascript scattered all over. If you view this file in the debugger, what you get is more or less the same thing as viewing the document source, with all the HTML and embedded CSS.

Is there a way to get a consolidated debugger view of all of the document's initially embedded <script> blocks (no dynamic javascript) without the HTML? I tried adding the sourceURL line to some template fragments, but the debugger captured only the first <script> block containing the sourceURL line, ignoring the rest. The debug view also replaced each line of HTML with a blank line instead of just removing it, so if sourceURL appears on line 614, I still have to scroll past 613 blank lines to get it.

0

There are 0 answers