Azure-functions-core-tools: VSCode debug: Cannot connect to runtime process

Created on 9 Aug 2017  路  7Comments  路  Source: Azure/azure-functions-core-tools

Azure Functions Core Tools find one function but in VSCode not attach.
Node version: 8.2.1
launch.json is incorrect?

notdebug

Thanks
Andrea

All 7 comments

Without "protocol":"inspector" there is the warning:
"Debugging with legacy protocol because it was detected"
With warning, vscode attach to debugger.
I must close this issue?

yeah, we are not running with --inspect. You should use legacy debugging

My debugger was stopping at various lines of code (node_modules code mostly) with no breakpoints enabled there. This was occurring with the message that debugger is running in legacy mode. I wanted to try the inspector mode to see if it fixes things but learned here that you don't support it.
I am running the azure functions cli on VirtualBox on top of a Mac so not sure if that also has something to do with this behavior.
I was able to debug without this issue when running the azure functions cli on Parallel Desktop previously, but I also don't believe I saw the debugging in legacy mode message there.

hmm, that's odd. There shouldn't be a difference between virtualbox and parallels in there.
Can you make sure your breakpoint setting for exceptions is the same between the 2 environments

image

is debugging possible on osx? I'm always getting Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:5858).

I tried legacy mode, installed various node versions (currently running latest 8.x.x version as docs state that debug is only possible with node 8)

I also added --debug vscode to task command in tasks.json as I thought this might be the reason, but nothing is happening :(

@ahmelsayed Yes, thank you - I did realize later that I had 'All Exceptions' checked for some reason causing it to stop in random places that it would have skipped over otherwise.

@passionkind , it is possible, but there is an issue with the latest release. For the workaround, see https://github.com/Microsoft/vscode-azurefunctions/issues/387

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frozenbubble picture frozenbubble  路  4Comments

buragc picture buragc  路  6Comments

AssassinTee picture AssassinTee  路  3Comments

lastcoolnameleft picture lastcoolnameleft  路  4Comments

brandonh-msft picture brandonh-msft  路  4Comments