vscode-azurefunctions icon indicating copy to clipboard operation
vscode-azurefunctions copied to clipboard

An error occurs when debugging a function project again

Open v-meilei opened this issue 11 months ago • 2 comments

OS: All Build Version: 20250308.1 Func CLI Version: 4.0.6821

Repro Steps:

  1. Create a .NET 9.0/8.0 C# project.
  2. Debug this C# project.
  3. Stop debugging and debug this project again.
  4. Check whether succeeds to debug the C# project again.

Expect: Succeed to debug this C# project.

Actual: Fail to debug this C# project. Image Output Log: Errorlog.txt

More Info:

  1. An error occurs when debugging a JavaScrip/TypeScript/Python/Java/PowerShell project again. Image
  2. The workaround is to kill "func.exe" in the Task Manager.

v-meilei avatar Mar 10 '25 10:03 v-meilei

I have also experienced this issue in both C# .NET 8 isolated azure functions and Python v2 Azure Functions. The C# error is the exact same as the one shown above. For Python I see the error below:

Image

You are also unable to delete files after the first run. For example trying to delete the bin/ folder on the C# Azure Function does not allow you to do so as it says the file is still in use

Workaround #2: Run this command in the VS Code terminal or other terminal:

taskkill /F /IM func.exe

jdurr1 avatar Mar 27 '25 18:03 jdurr1

Should be fixed by: https://github.com/microsoft/vscode-azurefunctions/pull/4682

nturinski avatar Aug 20 '25 21:08 nturinski