Skip to content

New js debugger throw on every import #102514

@dmail

Description

@dmail
  • VSCode Version:1.47.0
  • OS Version: macOS Mojave 10.14.6
  • Node version: 14.5 (also reproduced with node 13.8)

Steps to Reproduce:

  1. Reproduce the following file structure

    package.json

    {
      "type": "module"
    }

    index.js

    import foo from "./foo.js";
    import bar from "./bar.js";
    
    debugger;
    console.log(`${foo}${bar}`);

    bar.js

    export default "bar";

    foo.js

    export default "foo";
  2. Click Run and Debug

  3. Select Node.js

  4. VsCode throw on every import as if file does not exists.

Does this issue occur when all extensions are disabled?: Yes

Check the following gif illustrating the issue:

ezgif-2-eaef7b185c8a

The gif shows that <node_internals>/internal/url.js throw Invalid url errors on ./foo.js and ./bar.js. It seems node.js tries to perform the following code for some reason.

new URL("./foo.js", undefined)

Metadata

Metadata

Assignees

Labels

*as-designedDescribed behavior is as designeddebugDebug viewlet, configurations, breakpoints, adapter issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions