Search code examples
node.jsv8node-inspector

Understanding NodeJS/NodeInspector V8 Protocol


I want to control the NodeInspector Front-End. It is itself designed to control Node.js remotely. They communicate via the v8 protocol and I also found a (rather short) description of the principles of that protocol. But it's not enough for me to understand how the communication works. What is expected at startup, when are what events thrown what is expected from the front-end so that it highlights a specific line etc.

My current approach is to output the communication between Node-Inspector and NodeJS and then I try to mimic it. I make progress but it is very tedious. Another approach would to be to work through the NodeInspector Code (it is a modified WebInspector), but I am new to JavaScript, and this will probably be also very tedious.

So my question is if somebody knows a comprehensive guide or an entry point where I an start to to find out how the communication with NodeJS or NodeInspector works?


Solution

  • The node-inspector frontend is an old version of the webkit debugger frontend.

    Frontend: http://trac.webkit.org/export/head/trunk/Source/WebCore/inspector/front-end/

    Protocol: https://developers.google.com/chrome-developer-tools/docs/protocol/1.0/index

    I created a new version that uses the new protocol but focuses more on the timeline. https://github.com/Skomski/node-webkit-agent