【问题标题】:What's the difference of Launch via NPM and Launch via npm in Visual Studio Code debuggingVisual Studio Code调试中Launch via NPM和Launch via npm有什么区别
【发布时间】:2021-06-25 03:04:28
【问题描述】:

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"
        }

【问题讨论】:

  • 创建它们,看看有什么区别

标签: visual-studio-code vscode-settings vscode-debugger vscode-tasks


【解决方案1】:

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

没有真正的区别:带有“port”属性的启动配置是由旧版 node.js 调试器提供的,很快就会消失。第二个启动配置较新,来自 js-debug。

由于旧版调试配置会自动重定向到 js-debug 并且端口 9229 无论如何都是默认调试端口,因此应该没有区别。

【讨论】:

    猜你喜欢
    • 2021-08-26
    • 1970-01-01
    • 2021-04-21
    • 2018-03-17
    • 2019-03-01
    • 1970-01-01
    • 2021-05-19
    • 2012-11-28
    • 2019-01-27
    相关资源
    最近更新 更多