自从我将nodejs版本从6.10更新到8.10后,VScode调试器出错

时间:2018-05-16 15:22:27

标签: node.js debugging visual-studio-code aws-lambda vscode-debugger

由于我将node-lambda项目从6.10节点版本升级到8.10,我的调试失败了。

我的配置是:

{
    // informations: https://go.microsoft.com/fwlink/?linkid=830387
    // usefull environnement variables list at https://code.visualstudio.com/docs/editor/variables-reference
    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "launch",
            "name": "Debug Node Lambda ",
            "program": "/usr/local/bin/node-lambda",
            "args": [
                "run"
            ],
            "preLaunchTask": "debug",
            "postDebugTask": "clean",
            "runtimeVersion": "8.10.0",
            // "protocol": "inspector"
        },
}

这是我的输出错误消息:

/home/gwendal/.nvm/versions/node/v8.10.0/bin/node --inspect-brk=24258 ../../../../usr/local/bin/node-lambda run 
Debugger listening on ws://127.0.0.1:24258/d27c6111-ae5e-482a-a27a-e88829fd409f
Debugger attached.
Runtime [nodejs8.10] is not supported.
main.js:53

我找不到让它有效的方法......

1 个答案:

答案 0 :(得分:0)

问题是我没有将我的node-lambda更新为sudo并使用-g,因此11.7版本(节点8.10所需)不起作用。一切都在现在。