Andy Sterland
Andy Sterland

Reputation: 1936

Remote debugging Azure App Service with VS 2019

How do I enable debugging from VS2019 for my .NET app running in an Azure App Service? The portal only supports 2015 and 2017.

Remote debugging options

Upvotes: 19

Views: 24766

Answers (4)

AntLaC
AntLaC

Reputation: 1225

The VS 2019 option doesn't display in the "Classic" Application settings screen, you will need to use the new Configuration menu, then choose the "General Settings" tab when the blade opens.

enter image description here

Upvotes: 15

ossentoo
ossentoo

Reputation: 2029

Have you downloaded and installed the VS 2019 Remote Tools?

https://visualstudio.microsoft.com/downloads/?q=remote+tools#remote-tools-for-visual-studio-2019 (see the bottom of the page)

I had the same problem. I closed VS 2019 and installed the Remote Tools. When I relaunched, I went to Cloud Explorer and i now have the menu items I'm expecting.

Upvotes: 9

juunas
juunas

Reputation: 58898

You can also set the remote debugging version to "VS2019" through https://resources.azure.com.

You'll need to find the Web App e.g. from under Subscription name / resourceGroups / RG name / providers / Microsoft.Web / sites.

Then open config / web.

Switch from Read Only to Read/Write at the top if you didn't. Click Edit. Modify the version and enable debugging by settings these under "properties":

"remoteDebuggingEnabled": true,
"remoteDebuggingVersion": "VS2019"

Click PUT.

Upvotes: 2

Andy Sterland
Andy Sterland

Reputation: 1936

You can just connect from Visual Studio 2019 and it should all work without changing the portal settings.

  1. Open Visual Studio and your project
  2. Open Cloud Explorer View -> Cloud Explorer or ctrl+\, ctrl+x
  3. Find your App Service node in Cloud Explorer and select it
  4. Choose Attach Debugger from the context menu or the actions pane

Attach Debugger in Visual Studio

Upvotes: 32

Related Questions