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

Activity

  1. eugeneo commented on Jul 13, 2019

    @eugeneo
    Contributor

    I believe, this will help once it lands: #28453

  2. pavelfeldman commented on Jul 13, 2019

    @pavelfeldman
    ContributorAuthor

    Yes, it does seem to help! Should it deprecate / remove wait in the inspector.open as well? That api is stability 1, can we fix it?

  3. eugeneo commented on Jul 14, 2019

    @eugeneo
    Contributor

    I do not feel strongly either way.

  4. added
    inspectorIssues and PRs related to the V8 inspector protocol.
    on Jul 14, 2019
  5. jasnell commented on Jun 26, 2020

    @jasnell
    Member

    Any @nodejs/inspector ...is there anything further actionable here or can this be closed?

  6. benjamingr commented on Jun 26, 2020

    @benjamingr
    Member

    James - looks like Pavel is right no one just felt strongly enough about it

  7. github-actions commented on Jun 27, 2026

    @github-actions
    Contributor

    This issue has been marked as stale due to 210 days of inactivity.
    It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.

  8. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Jun 27, 2026
  9. github-actions commented on Jul 28, 2026

    @github-actions
    Contributor

    This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
    If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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