Skip to content

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

Closed
@markwylde

Description

@markwylde
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.inspectorIssues and PRs related to the V8 inspector protocol

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions