Skip to content

inspector.open(0, undefined, /* wait */true) won't allow communicating inspector.url() #28663

Description

@pavelfeldman

I'd like to open the first available debugging port and wait for client to attach before I continue execution, so I do:

inspector.open(0, undefined, /* wait */ true);

This results in a logical deadlock though: in order to get the inspector.url(), I need to continue execution. But execution only continues when connection is established over that exact URL I can't get. It makes me think that inspector.open does not really make sense with the wait === true.

Could this API be changed to something like below instead?

inspector.open(0, undefined, true, ({url}) => {
  clientPipe.send(url);  // <-- reports url
});
// <-- blocks execution.

@eugeneo, @ak239

Metadata

Metadata

Assignees

No one assigned

    Labels

    inspectorIssues and PRs related to the V8 inspector protocol.staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions