We can create a new Blazor project using Visual Studio 2017 (I am using the free community edition). Currently, there are three types of templates available for Blazor. We can choose Blazor (ASP.NET Core hosted) template.
Please note that we are not changing any code in the default application. We can directly deploy this application to Azure.
We can easily create a web app in Azure. Create a resource -> Choose Web App -> Create.
We have disabled the Application Insights instrumentation in this web app. Our web app will be created in a few minutes.
Publish the Blazor app to Azure
Right click “Server” project and choose “Publish” option from the menu.
Please note that for remote debugging, we must choose “Debug” mode instead of “Release” mode. So that, we must choose the “Create profile” option instead of “Publish immediately”.
We can click the “Advanced” link and choose the “Debug” option. By default, it is as “Release”.
We can choose the web app from the list. Please note that I have already created some web apps in the same resource group.
We can click the “Publish” button to publish the Blazor app to Azure.
After some time, our web app will be ready to use.
We can remotely debug the application. I have added a breakpoint in SampleDataController.cs file. This is triggered when we click the "Fetch data" button in the web app.
Open Cloud Explorer to enable Remote Debug
You must open the Cloud Explorer to enable remote debugging. You can find the option from View -> Cloud Explorer.
Select the web app from resource group and click “Attach Debugger” to enable remote debugging.
After some time, our application is ready with remote debugging.