Skip to content

inspector: fix inspector open when there are sessions - #46950

Closed
theanarkh wants to merge 1 commit into
nodejs:mainfrom
theanarkh:fix_inspector_open
Closed

inspector: fix inspector open when there are sessions#46950
theanarkh wants to merge 1 commit into
nodejs:mainfrom
theanarkh:fix_inspector_open

Conversation

@theanarkh

Copy link
Copy Markdown
Contributor

fix inspector.open when there are sessions.

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

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

const{ Session, open }=require('inspector');constsession=newSession();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-botnodejs-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
Sign up for freeto 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 / srcIssues and PRs related to general changes in the lib or src directory.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@theanarkh@nodejs-github-bot