javascriptnode.jsdebuggingvisual-studio-codeinspector

VSCode debugger does not work when cross-env is set


This is my test script. For some reason, when cross-env is called, vscode debugger doesn't work

{
    "test": "cross-env NODE_OPTIONS='--experimental-specifier-resolution=node' NODE_NO_WARNINGS=1 mocha test/**/*.{spec,test}.[jt]s --require test/prelude.js"
}

Solution

  • That is because you set NODE_OPTIONS using the cross-env