Skip to content

Conversation

theanarkh
Copy link
Contributor

fix inspector.open when there are sessions.

const { Session, open } = require('inspector');
const session = new Session();
session.connect();
open();

this code above will throw an error ERR_INSPECTOR_ALREADY_ACTIVATED, but the following code works.

const { Session, open } = require('inspector');
const session = new Session();
open();
session.connect();

i think we should only throw ERR_INSPECTOR_ALREADY_ACTIVATED when there is a inspector thread 🤔.

Refs: #33015
cc @joyeecheung

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Mar 4, 2023
@theanarkh theanarkh closed this Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants