Prerequisites to run/debug the Azure Functions in Visual Studio Code:
Azure Tools Extension
Azure Functions Core Tools
Also, Ensure that the Storage Emulator installed on your system, even it is deprecated but still used for local environment debugging and testing purposes
Azurite Extension on VS Code Extensions Menu
local.settings.json
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet"
}
}
.csproj file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
<None Update="host.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="local.settings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>
Debug Result:

Put a breakpoint at some code line inside the Run Method and Start debugging.
All the code files and debugging video is available in the GitHub Repository and debugging video, please compare each file to your code.
As specified in this VS Code Official Documentation, need to install the language runtime extension for debugging purposes like C# for .NET, Python, Java, JavaScript, PowerShell etc.
For example, for the above .NET Azure Functions Project I have installed this extension in VS Code:

Links to Install these extensions are given in prerequisites and in hyperlink wording formats.
References of VS Code debugging the Azure Functions:
- Debugging Azure Functions Locally in VS Code
- Microsoft Official Documentation of Azure Functions debugging in VS Code