Visual Studio 代码调试中 Launch via NPM 和 Launch via npm 有什么区别

What's the difference of Launch via NPM and Launch via npm in Visual Studio Code debugging

在vscode调试中有两种配置,

通过 NPM 启动和通过 npm 启动

我试过了,但没有在任何地方找到文档

它们有什么区别?

      // #launch via NPM
        {
            "type": "node",
            "request": "launch",
            "name": "Launch via NPM",
            "runtimeExecutable": "npm",
            "runtimeArgs": [
                "run-script",
                "debug"
            ],
            "port": 9229,
            "skipFiles": [
                "<node_internals>/**"
            ]
        },
        // #launch via npm
        {
            "name": "Launch via NPM",
            "request": "launch",
            "runtimeArgs": [
                "run-script",
                "debug"
            ],
            "runtimeExecutable": "npm",
            "skipFiles": [
                "<node_internals>/**"
            ],
            "type": "pwa-node"
        }

我从 vscode 开发人员那里得到了答案:https://github.com/microsoft/vscode/issues/127232

There is no real difference: the launch config with the "port" attribute is contributed by the legacy node.js debugger and will disappear soon. The second launch config is more recent and comes from js-debug.

Since the legacy debug configurations are automatically redirected to js-debug and since port 9229 is the default debug port anyway, there should be no differences.