Using "esm" in VSCode's NodeJs Debugger
I had a problem with the accepted answer. Using runtimeArgs
worked better:
"configurations": [
{
"type": "node",
"name": "import-test-files",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/scripts/import-test-files.js",
"runtimeArgs": ["-r", "esm"]
}
]