Reputation: 75
I changed the Function App from .NET 6 in-process to .NET 7 isolated. Sometime after that the debugging stopped working, possibly after a VS update sometime last week.
The breakpoint turns into a hollow red circle with the following message: "The breakpoint will not be currently hit. No symbols have been loaded for this document" I can see the following error message in VS2022:(in the Output window - diagnostics hub) "The current version of VS Remote Tools does not match this version of Visual Studio. If errors occur, try installing the matching version of VS Remote Tools."
The issue is reproducible on a fresh default installation of the newest version of VS2022 and a new Azure Function App.
The same thing is happening if the Runtime stack /function worker is set to .NET 6 isolated. The debugging works if the Runtime stack/function worker is set to .NET 6 in-process
So currently I'm unable to work as I can't debug my Function App and there are things I can't emulate locally.
The local debugging works. The 'debug' code is published. The 'Just my code' is enabled The .pdb file is published correctly
Is something missing from the Azure function app templates/setup in isolated mode which prevents remote debugging? How can I make the debugging work?
Upvotes: 3
Views: 1967
Reputation: 7297
"The current version of VS Remote Tools does not match this version of Visual Studio. If errors occur, try installing the matching version of VS Remote Tools."
In Visual Studio
click on Install more tools and features
.
ASP.NET and web development
and Azure development
in the modify section.Debugging and testing
are checked by default.Check the below steps to remote debug .NET 7 Isolated Function
.
Create Azure Function .NET 7 Isolated
.
Publish the Function App to Azure Windows App Service
.
In Publish
=> Settings
, Change the Configuration
to Debug
and click on Save
and Publish
the Function again.
Place the breakpoints in Function1.cs
file.
Download the Publish profile
to enter the credentials.
In VS
=> Debug
=> Attach to Process
, enter the Connection target
as the URL
of the deployed Application with PORT
no. 4024
.
Select Show processes for all the users
=> select dotnet.exe
and click on Attach
credentials
from the downloaded publish profile
and click ok.All the breakpoints are loaded and seen in red color.
Navigate to the Published Azure Function
=> Functions
=> select the Function (Function1)
=> Code + Test
=> Get Function URL
.
Upvotes: 2