“Attribute 'program' does not exist” for basic node.js project

前端 未结 12 1316
南方客
南方客 2021-01-31 13:08

I created simple node.js application (source code from here https://azure.microsoft.com/en-us/blog/visual-studio-code-and-azure-app-service-a-perfect-fit/)

var h         


        
12条回答
  •  既然无缘
    2021-01-31 13:53

    I had the same error, because I was passing the arguments inside "program" attribute like this:

    {
        "version": "0.2.0",
        "configurations": [
            {
                "type": "node",
                "request": "launch",
                "name": "Build -B -p",
                "skipFiles": [
                    "/**"
                ],
                "program": "${workspaceFolder}\\app\\build -B -p D:\\apps\\12"
            }
        ]
    }
    

    What solved for me was to pass the arguments inside "args" attribute, like this:

    {
        "version": "0.2.0",
        "configurations": [
            {
                "type": "node",
                "request": "launch",
                "name": "Build -B -p",
                "skipFiles": [
                    "/**"
                ],
                "program": "${workspaceFolder}\\app\\build",
                "args":["-B", "-pD:\\apps\\12"]
            }
        ]
    }
    

    The O.S. was Windows 7.

提交回复
热议问题