Search code examples
visual-studio-code.net-coreazure-functionsazurite

vs code azure function - debugging 2nd time


With Azurite running, I'm able to debug by c# dotnet-isolated azure function app ok by hitting F5. I then stop the debug session by clicking the stop button on the debug tool bar.

Problem is, if I try to run a 2nd debug session, I just blue animation under "run and debug" on the left of the screen - but nothing else happens.

After 3 minutes I get the error "Failed to detect running Functions host within 180 seconds.

If I restart vs code then I'm able to debug once.


Solution

  • It seems the problem is there is no "func host stop" command. So need to be sure that the terminal window that's opened when debug starts is manually close after clicking the stop debug button.

    Another option is to find the pid for the func process and kill it.

    ps -ax | grep func
    kill <pid from above>