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

fs/promises are not adhering to the "pause on uncaught exceptions" during inspect #35169

Open
markwylde opened this issue Sep 12, 2020 · 3 comments
Labels
fs Issues and PRs related to the fs subsystem / file system. inspector Issues and PRs related to the V8 inspector protocol

Comments

@markwylde
Copy link

markwylde commented Sep 12, 2020

  • Version: v14.10.1
  • Platform: macOS Calalina 10.15.6

What steps will reproduce the bug?

Create a javascript file with the following contents:

const fs = require('fs/promises');

async function main () {
  const result = await fs.readFile('/aaaaaa');
  console.log(result);
}

main();

Then run the file either in the Chrome DevTools, VSCode Tools or NDB, ensuring you have ticked the pause on exceptions and pause on uncaught exceptions button.

Screen Shot 2020-09-13 at 8 42 50 am

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

Every time

What is the expected behavior?

The debugger should pause on line 4, or perhaps an internal node script. Not sure, but it should break somewhere.

What do you see instead?

The code runs and normal, as if the pause button was never clicked.

Anything else?

When using the code below, using the promisify function from node, it works as expected.

const { promisify } = require('util');
const fs = require('fs');
const readFile = promisify(fs.readFile);

async function main () {
  const result = await readFile('/aaaaaa');
  console.log(result);
}

main();

This will pause on line 299 of the internal/util.js function.

@bnoordhuis
Copy link
Member

I didn't test but there's a pretty good chance #35208 fixes that.

@bnoordhuis bnoordhuis added fs Issues and PRs related to the fs subsystem / file system. inspector Issues and PRs related to the V8 inspector protocol labels Sep 15, 2020
@Scout2012
Copy link

Seems that this is still reproducible on Node v20.6.1

@markwylde
Copy link
Author

Also still reproducible on v21.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. inspector Issues and PRs related to the V8 inspector protocol
Projects
None yet
Development

No branches or pull requests

3 participants