0

I've found the official Chrome DevTools Debugger API for JavaScript and it's domains, like Debugger domain.

The thing is, the docs aren't that thoroughly describing the example usage of the API, so it's kinda not that easy to write a method which would hook into debugger's function execution step-by-step and log all the functions call stack until some point or the end of whole chain of executions.

What I want to achieve here is just log all the executions steps "in fly", without needing to pause for every new method call or loop inside method.

Basically I'm planning on writing small custom execution frames recorder.

Anyone used the chrome.debugger for creating methods/classess for SPA webapps, besides browser extensions?

6
  • Can you give a code example to compare your desired function and what DevTool represents? Commented Dec 19, 2023 at 14:14
  • Well, DevTools's JavaScript Debugger currently represent basically the same functionality like IntelliJ IDEA Ultimate JavaScript Debugger. The shown call stack frames logs history aren't fully logging everything for later view, from start of debugging when triggered by breakpoint to the end of the process started by particular method. Basically I'd like to achieve what AppMap plugin is doing, but with less cool features. I just want full list of executed methods, with scripts files names and line numbers and passed params values. Commented Dec 19, 2023 at 14:29
  • Found something like this code from How to get Javascript Function Calls/Trace at Runtime post. Will try it and report. Commented Dec 19, 2023 at 14:39
  • Nah, it's not quite the thing I'm looking for, this code from above pasted link. I'd rather need feature inside debugger, to save entire chain of function calls stack, from point A (breakpoint) up to the point B (to some other breakpoint or watch) or straight till the end of whole process execution. So I need some recorder functionality. Performance tab in DevTools can help a bit, but the report resulting in profiling don't have enough thorough informations, like the values of passed params into called method, the method's line number in which file. Commented Dec 19, 2023 at 14:47
  • Found DBux but it's Visual Studio Code extension, not IntelliJ IDEA Ultimate, which is bummer because I already have entire legacy app environment set up on IntelliJ. Commented Dec 19, 2023 at 15:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.