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

inspector: implement sub process inspection. #16627

Closed
4 tasks
eugeneo opened this issue Oct 30, 2017 · 6 comments
Closed
4 tasks

inspector: implement sub process inspection. #16627

eugeneo opened this issue Oct 30, 2017 · 6 comments
Assignees
Labels
child_process Issues and PRs related to the child_process subsystem. inspector Issues and PRs related to the V8 inspector protocol

Comments

@eugeneo
Copy link
Contributor

eugeneo commented Oct 30, 2017

This is an umbrella bug for implementing the functionality outlined here - nodejs/diagnostics#77

This implementation will land in several stages. Current plan is as follows:

  • Custom inspector message dispatcher. This stage will allow extending the Inspector protocol beyond domains provided by the V8
  • Provide Node.js implementaion for the Target protocol as outlined here
  • Provide communication channel between Node.js instances that runs outside the regular event loop (akin to Inspector WS server). This is necessary so the child instances are still accessible while the head instance is busy or is suspended on a breakpoint.
  • Integrate with process.fork and process.spawn, if possible. This will make debugging child processes easier.
@eugeneo eugeneo self-assigned this Oct 30, 2017
@eugeneo eugeneo added inspector Issues and PRs related to the V8 inspector protocol child_process Issues and PRs related to the child_process subsystem. labels Oct 30, 2017
@eugeneo
Copy link
Contributor Author

eugeneo commented Oct 31, 2017

For the item#3 (communication channel) the proposal is to introduce a new command line flag --inspector-pipe=path/to/pipe so parent process can communicate with child processes without child process listening on a socket. Pipe IO will be using same thread that is currently used for the inspector WS server.

@eugeneo
Copy link
Contributor Author

eugeneo commented Oct 31, 2017

Pull request to check first two check boxes: #16629

@TimothyGu
Copy link
Member

This should also make it (more) possible to implement inspector for workers (ayojs/ayo#58).

TimothyGu added a commit that referenced this issue Dec 23, 2017
The `auxData` field is not exposed to JavaScript, as DevTools uses it
for its `isDefault` parameter, which is implemented faithfully,
contributing to the nice indentation in the context selection panel.
Without the indentation, when `Target` domain gets implemented (along
with a single Inspector for cluster) in #16627, subprocesses and VM
contexts will be mixed up, causing confusion.

PR-URL: #17720
Refs: #14231 (comment)
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 8, 2018
The `auxData` field is not exposed to JavaScript, as DevTools uses it
for its `isDefault` parameter, which is implemented faithfully,
contributing to the nice indentation in the context selection panel.
Without the indentation, when `Target` domain gets implemented (along
with a single Inspector for cluster) in #16627, subprocesses and VM
contexts will be mixed up, causing confusion.

PR-URL: #17720
Refs: #14231 (comment)
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 9, 2018
The `auxData` field is not exposed to JavaScript, as DevTools uses it
for its `isDefault` parameter, which is implemented faithfully,
contributing to the nice indentation in the context selection panel.
Without the indentation, when `Target` domain gets implemented (along
with a single Inspector for cluster) in #16627, subprocesses and VM
contexts will be mixed up, causing confusion.

PR-URL: #17720
Refs: #14231 (comment)
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Jan 9, 2018
The `auxData` field is not exposed to JavaScript, as DevTools uses it
for its `isDefault` parameter, which is implemented faithfully,
contributing to the nice indentation in the context selection panel.
Without the indentation, when `Target` domain gets implemented (along
with a single Inspector for cluster) in #16627, subprocesses and VM
contexts will be mixed up, causing confusion.

PR-URL: #17720
Refs: #14231 (comment)
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
@eugeneo
Copy link
Contributor Author

eugeneo commented Feb 26, 2018

Chrome protocol has a major limitation that it relies on the parent target to outlive the children (as it is true in Web Platform use-case). This limitation greatly reduces usability in the Node.js case, which, coupled with amount of changes required in a platform, greatly reduces appeal. We are working on an alternative approach prototype.

@eugeneo eugeneo closed this as completed Feb 26, 2018
@boneskull
Copy link
Contributor

@eugeneo Is this effort tracked publicly anywhere?

@eugeneo
Copy link
Contributor Author

eugeneo commented Mar 7, 2018

No, there is no hard commitment. It some experiments our team is run, that's all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem. inspector Issues and PRs related to the V8 inspector protocol
Projects
None yet
Development

No branches or pull requests

3 participants