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

CDP setBlackboxPatterns no longer applies to Node internals #50058

Closed
connor4312 opened this issue Oct 5, 2023 · 2 comments
Closed

CDP setBlackboxPatterns no longer applies to Node internals #50058

connor4312 opened this issue Oct 5, 2023 · 2 comments
Labels
inspector Issues and PRs related to the V8 inspector protocol v8 engine Issues and PRs related to the V8 dependency. wrong repo Issues that should be opened in another repository.

Comments

@connor4312
Copy link
Contributor

Version

v20.8.0

Platform

Darwin mbp.peet.io 22.6.0 Darwin Kernel Version 22.6.0: Fri Sep 15 13:39:52 PDT 2023; root:xnu-8796.141.3.700.8~1/RELEASE_X86_64 x86_64

Subsystem

inspector

What steps will reproduce the bug?

  1. Have a file like console.log('hello');\nconsole.log('goodbye');
  2. Run with node --inspect-brk, and attach Chrome devtools to the process using chrome:///inspect
  3. Run Show Ignore List and add node: to that list. This regex should match, and skip, all Node internals (via setBlackboxPattern)
  4. Step in

How often does it reproduce? Is there a required condition?

100%

What is the expected behavior? Why is that the expected behavior?

I expect the debugger to stop on the next console.log('goodbye'), or at least try to.

What do you see instead?

The blackbox does not apply at all, and the debugger steps directly into the console call without trying to escape.

Additional information

This appears to have been broken since Node 16 in the migration to the node: prefix

@bnoordhuis
Copy link
Member

I don't think this is a node bug. Blackboxing isn't handled inside node at all. More likely it's a V8 bug or, less likely, a devtools bug.

FWIW, the inspector essentially calls new RegExp() and then invokes Regexp.prototype.exec. It's quite possibly not robust against prototype tampering.

@bnoordhuis
Copy link
Member

I'm going to go ahead and close this but LMK if something needs to be done on our side.

@bnoordhuis bnoordhuis closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
@bnoordhuis bnoordhuis added v8 engine Issues and PRs related to the V8 dependency. wrong repo Issues that should be opened in another repository. labels Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inspector Issues and PRs related to the V8 inspector protocol v8 engine Issues and PRs related to the V8 dependency. wrong repo Issues that should be opened in another repository.
Projects
None yet
Development

No branches or pull requests

2 participants