Remote Debug Azure App Service in Visual Studio 2015 - c#

I'm having trouble debugging my code on Azure App Services...it all "seems" like it should be working, but no breakpoints are hit, here's my setup.
C# MVC Website running using .NET 4.5.1 as a .NET Core Application (this is probably the most important detail)
Deploy a "debug" version to Azure App Services
Use the Azure portal to enable debugging for my version (remote debugging ON, Version 2015)
Use the "Cloud Explorer" in Visual Studio 2015 to "Attach Debugger" to the app service.
At this point, the Visual Studio interface will "attach", it'll go into debugger mode, I'll see a few output lines, but no modules for the site will load, and no breakpoints will ever be hit.
I've attempted to "attach" to other processes on that machine, but it's a shot in the dark without knowing exactly what I'm doing.
Any ideas?

Related

Visual Studio 2022 Publish window warning me about Azure App Service not supporting Win-x64

I have an ASP .Net 6 Web API (C#) which I am deploying to Azure App Service. On Visual Studio 2022's Publish window, I have the following configuration:
As you can see, there is a warning triangle next to the "Target Runtime" dropdown. If I hover my mouse over it, it says:
The instance of Azure App Service you are deploying to does not
support 'win-x64'. Please either enable support through Azure App
Service's settings or pick a different target runtime.
Now, on my Azure App Service configuration, I do have it set to 64 Bit:
The API does work once deployed, so I'm not sure if it's maybe just a false alarm?
The App Service is on an S1:1 pay-as-you-go service plan, with Windows OS, and the location is South Africa North:
I'm using Visual Studio Community 2022 (64-bit) Version 17.1.5
Thanks
As proposed by #TinyWang, I deleted and recreated the publish configuration, and the warning went away. Thanks

Why do I always have to stop my app in IIS Express before restarting debugging in Visual Studio?

I'm using Visual Studio Pro 2019, version 16.5.5. It recently (last month or so, maybe since 16.4.x) started doing this odd behavior for my ASP.NET Core application hosted using IIS Express for development.
During a debug session I'll need to make code changes.
I stop debugging in Visual Studio. IIS Express stops hosting.
IIS Express inexplicably restarts my application unattached from VS.
I make the code changes and try to hit Start Debugging.
Visual Studio complains that all the output files are in use: MSB3026 Could not copy "obj\Debug\netcoreapp2.1\blah.dll" to "bin\Debug\netcoreapp2.1\blah.dll". Beginning retry n in 1000ms. The process cannot access the file 'bin\Debug\netcoreapp2.1\blah.dll' because it is being used by another process. The file is locked by: "Visual Studio 2019 Remote Debugger (27568), .NET Core Host (6264)"
I right-click the IIS Express tray icon and click Stop Site under my application.
I try to Start Debugging again in Visual Studio
It brings up this dialog:
I hit OK and try again
It finally starts debugging.
It's infuriating. I don't understand why IIS Express restarts the application. It's not being detached, the process stops then immediately restarts without debugging.
I can skip steps 2-5 by stopping debugging by stopping the IIS Site first. But that's not how it should work.
Is this some IIS Express configurating? I want to shoot my laptop, but then I would get fired.

How to debug external code with IIS (not IIS Express)

I have a number of IIS 8.5 sites in development, that all need to run simultaneously in my development environment, to simulate a distributed system.
These sites use various NuGet packages, with PDB files available, that I want to step into for debugging. In particular I'm using some of the Microsoft Katana libraries and have downloaded the source code, matching the NuGet packages.
My problem:
When using IIS Express, I can open the Katana source code I want to debug in Visual Studio 2013 (eg OAuthBearerAuthenticationHandler.cs), set a breakpoint, then when running the site, the breakpoint will be hit.
But when I switch to using IIS (in the Visual Studio properties pages), the same breakpoint is just ignored.
I've only used Katana as an example. The general problem seems to be that when using IIS only C# source-code in the Visual Studio solution is debugged, but when IIS Express is being used, any matching source-code you have, can be debugged.
Is it possible to make IIS debug these external files in the same way that IIS Express does?
Visual Studio is running as administrator.

Visual Studio 2012 Performance Profiler not pointing to the application

I'm testing the performance of my C# application on Visual Studio 2012.
I used the Release build mode and opened the Performance Wizard on my application, but the performance Hot Paths is pointing to the System dlls (atidxx32.dll) but not to the code of my application.
Are they any specific steps that I need to do so that the profiler will look into the performance of my web application and not the system?
I did some researches and found that the Web configurations of my ASP.NET web application are set to use Visual Studio Development Server and not IIS Express.
I changed the configuration and all went very well, the Sampling mode of the performance profiler is now profiling my application properly.
Go to Proprieties of the web application project / Web / Servers, tick Use IIS Express.

"Attach to Process" using VS Web Developer Express 2010, any other options?

Looks like "Attach to Process" using VS Web Developer Express 2010 option to debug code not available when it is deployed in IIS. IIS and VS Express 2010 in same server.
After I published on IIS website (local), I want to debug in VSWD express 2010.
What are alternatives or workarounds for this?
If you are looking to debug your application with something other then Visual Studio, you have a few options. The first is Fiddler2 (http://fiddler2.com/) which allows you to view all traffic between the client browser and the host server. Another option is to start logging everything. This is especially useful for applications where you need to keep an audit trail of user actions.

Categories

Resources