Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subset of CDP as profile for Node.js tools and VMs #52

Closed
1 task
joshgav opened this issue Jun 2, 2016 · 7 comments
Closed
1 task

Subset of CDP as profile for Node.js tools and VMs #52

joshgav opened this issue Jun 2, 2016 · 7 comments

Comments

@joshgav
Copy link
Contributor

joshgav commented Jun 2, 2016

NOTE: Background reading and resources at the end of this post.

CDP groups functionality into Domains containing Methods, Events, and Types. The domains and members supported by a given runtime/debug target can be specified in a protocol.json file, ideally retrievable dynamically by the debugger at a /json/protocol endpoint on the debugee. Examples and discussion:

V8's currently-supported Domains are listed here.

For Node to fully support CDP we must implement and specify which Domains and other members Node supports, likely in a protocol.json file, and likely starting from those supported by V8 and the inspector agent. We could call this the Node "profile" for CDP.

This was discussed in #49's meeting.

  • This issue is to track progress on creating such a profile for Node.

Background and Resources

Please suggest more in the thread and I'll add them.

@joshgav
Copy link
Contributor Author

joshgav commented Jun 2, 2016

@MylesBorins
Copy link

thanks for putting this together @joshgav I'll go through the reading list today / tomorrow

@bnoordhuis
Copy link
Member

nodejs/node#7470 suggests linking/forwarding to a public URL but I'd be okay with embedding protocol.json in the binary. Then the user doesn't need an active network connection.

v8_inspector/js_protocol.json when minified and compressed is about 8.5 kB, which seems acceptable to me.

@NathanaelA
Copy link

+1 to embedding. Internet isn't always reliable...

@auchenberg
Copy link

auchenberg commented Jun 29, 2016

I favor expending the HTTP endpoint to add /json/protocol endpoint, which services the bundled protocol.json directly from Node. We already added support for this in the edge-diagnostics-adapter, and have worked the community to get support added in clients like chrome-remote-interface.

For now we don't have a formel spec for the HTTP endpoint exposed by various runtimes, but we can easily sketch one together as the amount of HTTP methods are fairly limited.

@bnoordhuis
Copy link
Member

nodejs/node#7491

bnoordhuis added a commit to bnoordhuis/io.js that referenced this issue Sep 23, 2016
Embed the compressed and minified protocol.json from the bundled
v8_inspector and make it available through the /json/protocol endpoint.

Refs: nodejs/diagnostics#52
PR-URL: nodejs#7491
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit to MylesBorins/node that referenced this issue Sep 28, 2016
Embed the compressed and minified protocol.json from the bundled
v8_inspector and make it available through the /json/protocol endpoint.

Refs: nodejs/diagnostics#52
PR-URL: nodejs#7491
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell pushed a commit to nodejs/node that referenced this issue Sep 29, 2016
Embed the compressed and minified protocol.json from the bundled
v8_inspector and make it available through the /json/protocol endpoint.

Refs: nodejs/diagnostics#52
PR-URL: #7491
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit to nodejs/node that referenced this issue Sep 30, 2016
Embed the compressed and minified protocol.json from the bundled
v8_inspector and make it available through the /json/protocol endpoint.

Refs: nodejs/diagnostics#52
PR-URL: #7491
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@joshgav
Copy link
Contributor Author

joshgav commented Oct 13, 2016

In our meeting last week - #64 - we decided to close this and go with what's provided within v8_inspector for now. If a more constrained profile is needed later we'll evaluate then.

@auchenberg started a chart to track compatibility across platforms, which helps with this too.

@joshgav joshgav closed this as completed Oct 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants