Yesterday I went to debug a project as usual. I put a breakpoint on the line I wanted to step into the code at. I ran the solution and did something that should have triggered the breakpoint. But nothing happens. It just skips over the code.
So I put a System.Diagnostics.Debugger.Launch() call just before the line I wanted to break. Now, when I run the code and trigger the function, a window pops up that says:
The Just-In-Time debugger was launched without necessary security permissions. To debug this process, the Just-In-Time debugger must be run as an Administrator. Would you like to debug this process?
To which I say yes. But then it opens Visual Studio in another window and begins debugging the w3wp.exe process. I can step through some of the code but not all of the code, which is not very useful, since I can't get to the code I really want to debug.
- I am running VS2019 as admin. Not sure why it asks me to run JIT as admin.
- I have checked my Global.asax file and there's nothing there that is shutting down the debugger.
- I've checked Event Viewer to see if maybe it could tell me something about the JIT debugger getting shut down by some other process before it can attach. But found nothing.
- An IISReset didn't fix it.
- I'm working with an Azure hosted web app with cloud services.
EDIT: I found this in the event log:
The description for Event ID 1015 from source Windows Azure Runtime 2.7.0.0 cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
1860
iisexpress
Role environment . FAILED TO INITIALIZE. hr: -2147467259
The message resource is present but the message was not found in the message table