I have a web app that's running in IIS. I have added some Trace.WriteLine statements to allow me to debug issues in prod like environments. I am trying to use DebugView utility to monitor those trace statements. If I try to set the Capture Global Win32 it gives me an error Unable to monitor Win32 debug output: Access is denied.
I tried running DebugView in elevated mode by right-clicking and choosing "Run as administrator" menu, but I am still getting the same error.
Am I missing something?
Related
I followed this tutorial to create a simple web job in Azure: https://learn.microsoft.com/en-us/azure/app-service/webjobs-sdk-get-started. The web job itself does its job, consumes the message in the queue and I see them appear in Application Insights.
However, I want to debug the function on my local machine by using the tools available in Visual Studio 2022.
I have published with following profile settings:
Next I've attached the debugger under het Hosting menu:
First thing I noticed is a message about no symbols being loaded when putting a breakpoint in the function:
When I add a message to my queue, it gets consumed by the web job but the breakpoint is never hit. I've been reading a lot of similar questions regarding a this issue but I'm not progressing any further.
In Azure Portal, I've enabled Remote debugging under Configuration > general settings
In Visual Studio 2022, I checked if the correct process is attached
Here I'm a bit confused thou, the connection target is connecting through port 4024, which is according to this document, the port for Visual Studio 2019. However, a connection target with port 4026 is not found.
What am I missing here? Am I forgetting another setting somewhere?
If have tried changing the stack setting .NET version from APS.NET V4.8 to NET 6 (LTS) but that didn't help.
Should the platform architecture match the architecture of my machine in order to get it to work? Or is this not linked in any way with the debugger?
Is there anything else that I should check or try? Because my hair is turning grey here :)
Apologies for the delay here!
It should be 4024 for both 32 and 64 bit.
See this Azure doc: Remote Debugger Ports on Microsoft Azure App Service
Typically, the error “The breakpoint will not currently be hit. No symbols have been loaded for this document.” -- This error message indicates we can start debug process and attach, but cannot set a breakpoint on any or some lines of code in the project.
Most, likely cause: Application is built without debug symbols or debug symbols are not available
Kindly try these steps:
Verify Debug Symbols are being used and published and in sync
Workaround the issue by disabling “Enable Just My Code” from the
Tools >> Options >> Debugging >> general menu in Visual Studio
Other things to narrow-down the issue:
Debug symbols must be available locally or deployed to the Azure App Service, and must match the local code you are trying to debug.
It is recommended to use Cloud Explorer over Server Explorer to
connect and debug which requires the Azure SDK.
You could optionally Manually Attach a Debugger to Azure Web Apps to troubleshoot this further or recommend this as a workaround.
(old blog, try similar steps)
Kindly verify the port (Visual Studio remote debugger port assignments ) required is open in the corporate firewall and on your local machine.
As a test, you may use tool like Wireshark/netmon, to see if the port successfully connects to the port (4024) needed by the process.
I'm trying to add snap into Microsoft Management Console in windows 10. But when I try to add certificate, an error message is coming with the header Microsoft Management Console has stopped working:
When I click the Debug button, Visual Studio 2015 gives me a message like this:
I've tried a solution found by google search saying to run sfc/scannow command in command promt but didn't get any result.
So this doesn't address the error itself, but if you were trying to use the snap-in to access the local computer certificate store then there is a work around.
Open up command prompt and type in 'certlm.msc', this should directly open up the local computer certificate store plug-in without having to go through the buggy menus.
I am receiving an intermittent (but extremely frequent) error when attempting to debug my web app using Visual Studio 2012 and IE 11 via f5.
The error is a message box: "Unable to start program 'http://localhost:36422/default.aspx'. Access is denied."
Internet explorer opens, but no page is loaded.
If I retry enough times, it will eventually succeed, my app loads and I can debug.
I have noticed via task manager that when the error occurs, the internet explorer process is hanging around after I close it. The number of ie processes continues to build up until I have to kill them.
I am getting a large number of errors in my system event log which may be related (although an entry is not generated every time the error occurs):
The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID
{0C0A3666-30C9-11D0-8F20-00805F2CD064}
and APPID
{9209B1A6-964A-11D0-9372-00A0C9034910}
to the user my user name SID (S-1-5-21-1364137996-2577644926-3768900005-1179) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.
A google search of the guid indicates that the application in question is Machine Debug Manager.
I have tried adding the interactive user to the access permissions for Machine Debug Manager using dcomcnfg and rebooting my pc to no effect.
I'm getting an error when I try to view the Azure Compute Emulator UI.
Steps:
Launch an Azure project to kick off the emulator.
Right click on Azure emulator icon and select "Show Compute Emulator UI"
This produces the error:
"This application has encountered an internal error and needs to be closed"
This has been working before but I haven't changed anything so does anyone know what could have started causing the error now? The Storage Emulator UI still seems to display OK.
I have the following environment:
Windows 8.0
Visual Studio 2012 Professional
Azure SDK 2.2
Create system variable and user variable in your system environment variables :_CSRUN_STATE_DIRECTORY with value like 'C:\TempAzure' (without commas). DO NOT LEAVE A SLASH AT THE END like 'C:\TempAzure\'.
Follow this link and do it and refresh your environment vars because compute emulator will not get them until refreshed.
Is there a command to refresh environment variables from the command prompt in Windows?
This was the solution which worked for me.
A hint how I got it :
1. Start your event viewer and your azure sdk command prompt with elevated privileges ( as administrator )
2. type csrun /devfabric:start
3. Go to event viewer and hit F5 and look for the error from DFService.exe. There should be 2-3 new errors and the first should be from DFService. Look at the description - it should contain something like :
Application: DFService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
Stack:
at System.IO.Path.CheckInvalidPathChars(System.String, Boolean)
at System.IO.Path.NormalizePath(System.String, Boolean, Int32, Boolean)
at System.IO.Path.GetFullPath(System.String)
at Microsoft.ServiceHosting.Tools.DevelopmentFabric.Program.Main(System.String[])
The last row flashes the red lamp :)
How to use Visual Leak Detector to attach to a process running as a windows service.
If someone has used this tool to detect memory leaks for service, please let me know the procedure.
I am including "vld.h" in my source file as in the documentation nothing else.
Compile your service in debug with vld.h included.
Start your service from the Services Control Manager (no debugger involved yet)
Start Visual Studio - in the Debug Menu select attach to process
Select your process (your service) - make sure to enable native debugging
Stop your service with the debugger still attached and you should get output in the debug window.