If you want to use the "Undo Attribute Change" function for debugging, you can do the following:
Comment all the JS on the page (hopefully everything is in the head ), except for the jQuery base load.
Download the page and set the clock.
Add a button that launches JS in the HTML. Or maybe start it from the console.
Run boot / fire js. We hope your watch and break points will shoot at will.
For example, suppose your page loads / has:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script> <script src="/Library_X.js" type="text/javascript"></script> <script src="/MyJS.js" type="text/javascript"></script>
Then you can run this code in the console after setting the watchpoints:
function addJS_Node (text, s_URL) { var scriptNode = document.createElement ('script'); scriptNode.type = "text/javascript"; if (text) scriptNode.textContent = text; if (s_URL) scriptNode.src = s_URL; document.head.appendChild (scriptNode); } addJS_Node (null, '/Library_X.js');
Or temporarily name the button that launches the same JS in the HTML page.
source share