Skip to content

Freshly created JavaScript Azure Functions project throws an error when starting debug #1175

@petmat

Description

@petmat

I just created a new JavaScript Azure Functions project with a HttpTrigger function and now when I hit F5 to debug it I get the following error in the terminal:

> Executing task: func extensions install <

Unable to find project root. Expecting to find one of host.json, local.settings.json in project root.The terminal process terminated with exit code: 1

Why could this be?

I have installed:
Visual Studio Code v1.33.0
Azure Functions extension v0.16.0
azure-functions-core-tools v2.5.553
Windows Pro 10.0.17134

Here's my tasks.json:

{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "func",
      "command": "host start",
      "problemMatcher": "$func-watch",
      "dependsOn": "func: extensions install",
      "isBackground": true
    }
  ]
}

and here's my launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Attach to Node Functions",
      "type": "node",
      "request": "attach",
      "port": 9229,
      "preLaunchTask": "func: host start"
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions