An error occurs when debugging a function project again
OS: All Build Version: 20250308.1 Func CLI Version: 4.0.6821
Repro Steps:
- Create a .NET 9.0/8.0 C# project.
- Debug this C# project.
- Stop debugging and debug this project again.
- Check whether succeeds to debug the C# project again.
Expect: Succeed to debug this C# project.
Actual:
Fail to debug this C# project.
Output Log:
Errorlog.txt
More Info:
- An error occurs when debugging a JavaScrip/TypeScript/Python/Java/PowerShell project again.
- The workaround is to kill "func.exe" in the Task Manager.
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:
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
Should be fixed by: https://github.com/microsoft/vscode-azurefunctions/pull/4682