Disable only certain js files in a browser

Viewed 18782

I'm trying to diagnose an issue with a web app that uses multiple Javascript files. One of the scripts modifies DOM by injecting a new element into it. My idea is that I would disable js files one by one until I find the one that causes the DOM modification. Is there a way in a browser to disable only certain js files? I would prefer a solution in Google Chrome (if its not possible then in Firefox or IE11)

3 Answers

Try DOM Change Breakpoints. Whenever some JS modifies your DOM, you pause on the exact line of code that caused the change.

And yes, it is possible to disable JS files. See Block Requests. DevTools blocks the request for the JS file, therefore it never runs. Although in this particular situation, DOM Change Breakpoints will probably help you diagnose the problem faster.

Well, you can try to use SYBU JavaScript Blocker extension if you are in chrome, i don't know if that extension exists for other navigators.

Related