Remote debugging an ASP.NET Core 1.0 application in Azure App

Essentially, I have an ASP.NET Core 1.0 (rc1-final) application that I published in the Azure App Service, and run into an error that only appears there, and it’s not clear from the logs what causes it.

Therefore, I tried to use the remote debugging capabilities of Visual Studio 2015 (Update 1) and Cloud Explorer to debug the application. Debugging begins, but breakpoints do not fall because debugging symbols do not load.

I tried both release and debug builds to no avail. The dnx web project is compiled with the option "Build output" (which packs the project into a nuget package), so xmldoc is created and published with it (note: I use Swashbuckle for documentation of SwaggerGen for Rest API and xmldocs is required for additional documentation )

I found several articles on the old nuget package creation path and the -symbol parameter, but I did not find a way to generate or pass the parameter to the dnx / dnu build process and publish it to the server.

The application is now published using the Azure Publishing toolkit in Visual Studio 2015 Update 1.

Has anyone got a working solution on how to remotely debug (preferably a compiled version) ASP.NET Core 1.0 web application in Azure App Service?

+5
source share
1 answer

The solution is pretty simple when you know where to look.

The tool joins the w3wp.exe process by default, and since DNX applications run outside of it, it cannot debug them.

After running debugging through the cloud explorer, we can go to the Debug > Attach to Process menu, select the App Service instance from the Qualifier drop-down list, and then select the dnx.exe process and attach it as indicated in this blog post .

There seems to be no one-click solution.

+2
source

Source: https://habr.com/ru/post/1247923/


All Articles