DOM loading breakpoint

I am trying to use a really old page on a website on which I have no control (therefore, I cannot edit its resources).

The problem is that it redirects the page using javascript (to "we donโ€™t support this garbage for the browser") by setting document.location before I can set any breakpoints and then debug / bypass.

Is it possible to break as soon as the DOM boots, preferably in chrome?

Disabling javascript stops the redirection, but chrome does not allow me to view any scripts and then place breakpoints.

+4
source share
2 answers

FireBug has a "Break On Next" feature. I'm not sure if this will work in your case, but it might be worth a quick try: https://getfirebug.com/doc/breakpoints/demo.html#suspend

0
source

Chrome seems to like to do something so that you donโ€™t see the code when you click the Stop button before the page finishes loading. It will say something like window.script123456738391=1; . This makes it impossible for you to set a breakpoint in the right place inside the code, especially if there is a redirect on the page before you can pause it.

What I found can be done is set a breakpoint on the first line. The next time you load the page, it will break on the first line, no matter what it is. Then you can see all the code that the page will load and set breakpoints wherever you want :)

0
source

Source: https://habr.com/ru/post/1381833/


All Articles