You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The Debugging is not hitting the Breakpoint when Remote Debugging using Visual Studio 2017 #844
I published a Debug version of Azure Function (v2, C#, precompiled)
The Debugging is not hitting the Breakpoint when Remote Debugging
If I run locally, then Debugging works as expected.
It seems that I am unable to remote debug Azure Functions V2 C# precompiled, using Visual Studio, the debugging sessions starts, but the breakpoints does not hit
I noticed this message
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.
Have you checked the Modules window to see if your symbols are getting loaded?
Regarding the message you saw, it's possible the issue is related to your use of VS 2017 15.8.0, which is currently in preview, and thus we might not have the right server-side components installed. Henry Hamid Safi (@safihamid) do you know if the remote debugging bits we have today work with this prerelease version of VS?
I just tested this using 15.8.0 Preview 2.0 out of the box and everything worked fine for me. I didn't need to install any additional remote tools. I suggest you uninstall the remote tools package from your client and see if it works or not. Also using Runtime version: 2.0.11857.0 (beta) .
System.Runtime.InteropServices.COMException (0x89710023): Unable to connect to the Microsoft Visual Studio Remote Debugger named 'webapius.azurewebsites.net'. A conexão com o ponto de extremidade remoto foi encerrada.
at Microsoft.VisualStudio.Debugger.Interop.Internal.IDebuggerInternal120.ConnectToServer(String szServerName, VsDebugRemoteConnectOptions[] pConnectOptions, CONNECT_REASON ConnectReason, Int32 fIncrementUsageCount, IDebugCoreServer3& ppServer)
at Microsoft.VisualStudio.Web.Azure.MicrosoftWeb.Operations.RemoteDiagnosticsSessionBase.ConnectToServer(String site, String user, String password)
Then I installed it again, but still have this error. Can not start Debugging session.
If I try to start debugging on the next Function (webapiusv2 in that piture), then it starts the debugging session.
I don't know how, but now the debugging is worked again, that error window is not appearing anymore.
Breakpoint hits.
Then after a few attempts, breakpoint does not hit again.
Another thing, sometimes when right click the Function on Azure Server Explorer and select Attach Debugger,
this error appears
Object reference not set to an instance of an object.
I got the same problem and using Azure Functions and Web Tools 15.0.40617.0. I'm running my app on an app service plan and not even the modules are loaded from my function app.
Jerome Koller (@jeromekol) There is a bug in VS Cloud Explorer for functions V2 that will be fixed soon. But when manually attaching make sure in the 'Attach to:' when clicking the 'Select...' button you pick 'Managed (CoreCLR) code'.
Reacted by Jerome Koller, 46mako, Keir Sweeney, Ralph Jansen and VoodooSV
This worked last week and does not work today. I get the same message in the output window -> Diagnostics Hub from both Server explorer and Cloud explorer. Mathew Charles (@mathewc) - can this be reopened?
Jerome Koller (@jeromekol) There is a bug in VS Cloud Explorer for functions V2 that will be fixed soon. But when manually attaching make sure in the 'Attach to:' when clicking the 'Select...' button you pick 'Managed (CoreCLR) code'.
I am trying this step but i receive an invalid credential exception. what cred should i use? i tried my ms 365 account but it doesn't recognize it, i am the owner of the subscription.
Jerome Koller (@jeromekol) There is a bug in VS Cloud Explorer for functions V2 that will be fixed soon. But when manually attaching make sure in the 'Attach to:' when clicking the 'Select...' button you pick 'Managed (CoreCLR) code'.
Open it in Notepad (or similar) and find the userName and userPWD fields
Use those in the credentials challenge
NB:// the userName will be in various formats in the file for different profile types, use the one which looks like function-app-name$function-app-name
Activity
cgillum commentedon Jun 18, 2018
Have you checked the Modules window to see if your symbols are getting loaded?
Regarding the message you saw, it's possible the issue is related to your use of VS 2017 15.8.0, which is currently in preview, and thus we might not have the right server-side components installed. Henry Hamid Safi (@safihamid) do you know if the remote debugging bits we have today work with this prerelease version of VS?
safihamid commentedon Jun 18, 2018
I just tested this using 15.8.0 Preview 2.0 out of the box and everything worked fine for me. I didn't need to install any additional remote tools. I suggest you uninstall the remote tools package from your client and see if it works or not. Also using Runtime version: 2.0.11857.0 (beta) .
TonyHenrique commentedon Jun 18, 2018
After uninstalling Remote Tools
When I Attach Debugger, this appears
Then I installed it again, but still have this error. Can not start Debugging session.
If I try to start debugging on the next Function (webapiusv2 in that piture), then it starts the debugging session.
TonyHenrique commentedon Jun 19, 2018
Chris Gillum (@cgillum) I checked now the Modules

My assembly WebAPI.dll has Symbols loaded.
TonyHenrique commentedon Jun 19, 2018
I don't know how, but now the debugging is worked again, that error window is not appearing anymore.
Breakpoint hits.
Then after a few attempts, breakpoint does not hit again.
TonyHenrique commentedon Jun 19, 2018
Another thing, sometimes when right click the Function on Azure Server Explorer and select Attach Debugger,

this error appears
Object reference not set to an instance of an object.
jeromekol commentedon Jul 20, 2018
I got the same problem and using Azure Functions and Web Tools 15.0.40617.0. I'm running my app on an app service plan and not even the modules are loaded from my function app.
safihamid commentedon Jul 23, 2018
Jerome Koller (@jeromekol) There is a bug in VS Cloud Explorer for functions V2 that will be fixed soon. But when manually attaching make sure in the 'Attach to:' when clicking the 'Select...' button you pick 'Managed (CoreCLR) code'.
jeromekol commentedon Jul 24, 2018
thx Henry Hamid Safi (@safihamid) that worked for me!
StingyJack commentedon Feb 22, 2019
This worked last week and does not work today. I get the same message in the output window -> Diagnostics Hub from both Server explorer and Cloud explorer. Mathew Charles (@mathewc) - can this be reopened?
vjppaz commentedon May 18, 2021
I am trying this step but i receive an invalid credential exception. what cred should i use? i tried my ms 365 account but it doesn't recognize it, i am the owner of the subscription.
RDavis3000 commentedon May 18, 2024
NB:// the userName will be in various formats in the file for different profile types, use the one which looks like function-app-name$function-app-name
safihamid commentedon May 20, 2024
By any chance you have Basic Auth disabled for your site?