2

We use the heap profiling tool in Chrome to try to find and fix memory leaks in our chrome application.

It is quite un-convenient to trigger the the heap dumps from the UI, and would be so much easier to do from javascript. Also, it would allows us to do it at a specific execution time.

Is there any way to trigger them from javascript? Or at least halt the javascript execution from javascript so that we can then trigger the heap dump at the perfect time?

1 Answer 1

2
  1. There's no mechanism to trigger a heap dump from JavaScript. I think it's a good idea, however. If you don't mind, please file a request at http://new.crbug.com/, and I'll make sure it lands in the team's queue for triage.

  2. You can jump into the debugger directly from JavaScript with the debugger; command. If the web inspector is open when that code executes, it will pause execution, just as though you had set a breakpoint there.

Sign up to request clarification or add additional context in comments.

2 Comments

Published to crbug, but I wasn't perfectly sure of the category to select. I'll check the debugger call.
Handed it off to the devtools group. Thanks for the request!

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.