Reputation: 32952
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?
Upvotes: 2
Views: 373
Reputation: 5143
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.
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.
Upvotes: 2