Skip to content

VS Code JavaScript Functions project: Debugging does not work (based on after-GA versions) - the infamous 'Cannot connect to runtime process...' #1002

@ChristianWeyer

Description

@ChristianWeyer

My setup:

  • macOS 10.13.6
  • VS Code Version 1.28.2
  • Azure Functions Core Tools (2.1.725 Commit hash: 68f448fe6a60e1cade88c2004bf6491af7e5f1df)
  • Function Runtime Version: 2.0.12134.0

After creating a fresh Azure Functions JavaScript project in VS Code, I try to debug the functions project by hitting F5.

After the host started up, I get this error:
Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:5858).

Additional information can be found in the Debug Console window:
Debugging with inspector protocol because Node.js version could not be determined (Error: connect ECONNREFUSED 127.0.0.1:5858)

image

This is the launch.json file generated by VS Code:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Attach to JavaScript Functions",
      "type": "node",
      "request": "attach",
      "port": 5858,
      "preLaunchTask": "runFunctionsHost"
    }
  ]
}

I tried with node version 8.8.1 and 10.0 - no luck so far.

Adding this setting to local.settings.json, debugging works - but I thought this should have been fixed in recent tools?
"NODE_OPTIONS": "--inspect=5858"

Any thoughts? .cc @mhoeger
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions