-
Notifications
You must be signed in to change notification settings - Fork 134
Breaking changes to JavaScript Debug Configuration
The debug configuration for v2 of the Azure Functions runtime has changed and old configurations will likely fail with the error "Cannot connect to runtime process, timeout after 10000 ms". You will automatically be prompted to update your configuration when you open a project. However, you can manually update your project with one of the following options:
The first option is to add languageWorkers__node__arguments
to your runFunctionsHost
task in .vscode\tasks.json
as seen below:
{
"version": "2.0.0",
"tasks": [
{
"label": "runFunctionsHost",
"type": "shell",
"command": "func host start",
"options": {
"env": {
"languageWorkers__node__arguments": "--inspect=5858"
}
},
"isBackground": true,
"problemMatcher": "$func-watch"
}
]
}
The second option requires two steps:
-
Pass the
--language-worker
parameter tofunc host start
in yourrunFunctionsHost
task in.vscode\tasks.json
as seen below:{ "version": "2.0.0", "tasks": [ { "label": "runFunctionsHost", "type": "shell", "command": "func host start --language-worker -- \"--inspect=5858\"", "isBackground": true, "problemMatcher": "$func-watch" } ] }
-
Add the
FUNCTIONS_WORKER_RUNTIME
setting to yourlocal.settings.json
:{ "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "", "FUNCTIONS_WORKER_RUNTIME": "node" } }
The recommended debug configuration going forward has not been finalized. It will likely be similar to Option 2, but without a change to local.settings.json
(since that file is not tracked by git). See here for more information.