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: fix inspector open when there are sessions #46950

Closed
wants to merge 1 commit into from

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