Search code examples
javascriptscrollreverse-engineering

Is there anyway to view executed JS functions names for certain period of time?


I need to understand how some site loads additional content when I finished scrolling. I need it for loading that content by my own injected JS without scrolls.

The way I see is to press somewhere some button to start recording functions calls, then I scroll down, new content loads, then I stop recording and looking for something useful.

If you know some better ways to track down needed functions please explain those.

I can use any browser for debugging.


Solution

  • You could probably accomplish this using the Chrome DevTools XHR breakpoints. You'll have to do it in two steps.

    First, open DevTools and go to the Network tab. Watch for the remote address that the scroller is loading data from. Then, go to the Sources tab and add an XHR breakpoint with that address. Chrome will stop in code when a request to that address is made.

    XHR breakpoint