node-webkit-agent icon indicating copy to clipboard operation
node-webkit-agent copied to clipboard

setRecordingProfile is going away in DevTools front ends

Open bpytlik opened this issue 10 years ago • 3 comments

In issue 106252002 setRecordingProfile was removed from DevTools front ends as an interface. According to an email exchange I had, it's been replaced by '... Profile.consoleProfileStarted/consoleProfileFinished events to signal front-end that application initiated profile started/finished...'. I stumbled across this while trying to wrap my head around how node-webkit-agent works.

bpytlik avatar Apr 22 '14 19:04 bpytlik

I can help you understand how this project works if you ask me specific questions about anything. It will save you time.

c4milo avatar Apr 22 '14 20:04 c4milo

Thanks, I'll be sure to ask you questions in the future where I can't figure things out. In this case, I was trying to find documentation for what the protocol was node-webkit-agent used to communicate with DevTools. I noticed that setRecordingProfile was one of the things that it sent and that that seemed to change the state of the button in DevTools. So, I searched for that thinking it would lead me to a useful protocol definition (as all the ones I'd found in the chromium documentation hadn't actually defined what messages could actually be sent over the protocol). That ended up taking me to the issue referenced above which it seemed like would be useful for you to know about if you didn't already.

I eventually found the devtools/protocol.json file which seemed to me to be what I was looking for. All of this was done in the hope of figuring out how to add flamegraphs as those seem like they would be useful. I was trying to determine what infrastructure DevTools needed to support flamegraphs to figure out what needed to be added to webkit-agent.

bpytlik avatar Apr 23 '14 01:04 bpytlik

Oh I see. Indeed, Chromium project doesn't have documented the part of the protocol related to profiling. So, I had to discover it by myself. I believe the same would have to be done for flamegraphs. I would usually study Chromium codebase to see how the interaction happens between Devtools Frontend and the Chromium backend.

Current Devtools frontends supported by this project don't have the UI for Flamegraphs. So, we need to integrate the latest stable Devtools frontend that comes with Chromium. I laid out more or less the process to extract it here: https://github.com/c4milo/node-webkit-agent/blob/gh-pages/README.md BUT the Chromium team has recently improved a lot the documentation for Devtools contributors, and they most likely have a better workflow now, check it out: https://developers.google.com/chrome-developer-tools/docs/contributing.

c4milo avatar Apr 23 '14 12:04 c4milo