DEV Community

Swatantra
Swatantra

Posted on

How to setUp the debugger in the vscode while using ESM module in nodejs

create the .vscode folder in the root directory of your project and paste the below code

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Node.js ESM",
      "program": "${workspaceFolder}/your-esm-entry-file.js",
      "runtimeArgs": ["--loader", "esm"]
    }
  ]
}


Enter fullscreen mode Exit fullscreen mode

Top comments (0)