I'm trying to remotely debug a web app on azure. I published using Web Deploy the debug configuration, and added the breakpoint, right clicked on the Attach Debugger on my Web App instance and the debugger launched and everything is looking good.
But after waiting for like 20sec for the page to load( the debugger launched my website), the visual studio debugger terminates and im being returned to normal editing, and the web page actually load on the browser. Have no clue what that might be happening.
Do you enable Remote Debugging for the right Visual Studio version in your web app configuration?
Related
I have deployed the following API as is to an Azure App Service from Visual Studio.
I have made sure that I have Remote Debugging and Visual Studio version 2022 selected in General settings in the App Service Configuration.
When I try and attach process from Visual Studio to my App Service I get thefollowing error:
In VS 2022, We have an easy and direct way to attach debugger.
After publishing your WebApp, In Hosting settings we will find an option to Attach Debugger.
Once debugger is attached, Remote debugging is enabled in Portal => Configuration Settings automatically.
Place a break point in any of the form which you want to debug.
Visual Studio finds the process, all the symbols will be loaded, and debugger is attached.
I have a function app deployed into Azure and I would like to remote debug it.
remote debugging is activated in the portal
I have tested 32 and 64 bit platform
In Kudu, I can see "msvsmon.exe" running
I have tried manually to "attach to the process" with the port requested in the microsoft documentation regarding Visual studio versions
I have tried from a VM in Azure
I have deactivated firewall in the VM
I have added an outbound rule will all permissions in the vm network settings
I have tried with VS 2019 version and the "Cloud explorer view"
I have tried with VS 2022 (Up to date --> Version 17.3.2) with "connected services"
And I always get this error:
System.Runtime.InteropServices.COMException (0x89710023): Unable to
connect to the Microsoft Visual Studio Remote Debugger named
'HOSTNAME.azurewebsites.net:4024'. The input data was
not in the expected format or did not have the expected value.
at
Microsoft.WebTools.Azure.VS.Operations.IDebuggerInternal120.ConnectToServer(String
szServerName, VsDebugRemoteConnectOptions[] pConnectOptions,
CONNECT_REASON ConnectReason, Int32 fIncrementUsageCount,
IDebugCoreServer3& ppServer) at
Microsoft.WebTools.Azure.VS.Operations.RemoteDiagnosticsSessionBase`1.ConnectToServer(String
hostNameWithPort, String user, String password)
Any idea how to fix ?
Please check the following steps to remote debug in Visual Studio 2022:
Switch the remote debugging to on in Azure Portal Function App Configuration > General Settings
In Visual Studio 2022 Azure Functions Project, publish to Function App in the debug mode.
Click on Open Site to check the function app is up and running. And then click Attach debugger on Hosting options (...) in the VS Publish window.
It will take some time to attach the w3wp process automatically and activating the breakpoint we placed in the Function Code.
After activating the breakpoint, hit the Azure portal function app trigger URL in the browser, then within 2 to 3 minutes, VS will start the remote debugging as you can see in my below Gif.
This deals with the "debug in web browser" button specifically.
I can debug a running project by clicking "attach to process" and that works... sort of. It does not allow us to debug javascript or html inside visual studio, and that is what we want to do. Currently we are forced to debug in the web browser's tools, and that is less than ideal.
We are using visual studio 2017 community.
Each of our dev computers has a cloned client database on it. Publishing locally to that works fine. What i would like to happen is that the debug (play) button ALSO hook to that database. Currently it is creating a new blank database in IIS. I am positive this is possible, but i do not know how to configure it.
The resulting answer is silly. The main connection string in the project needed to point at the sql database, and that's it. We alias it out for each client, but evidently the run button doesn't do the aliasing.
I follow instruction on https://msdn.microsoft.com/en-us/library/azure/ff683670.aspx to debug a project in Azure Emulator in Visual Studio 2013. But after clicking "Show Compute Emulator UI", I can not find "Debug" On the Azure compute emulator (express) menu bar. What is the problem? Thanks for help.
You need to make sure that you have the correct project set as the Startup Project.
For example:
The Azure project here includes a Worker Role that is implemented in the Azure.Processor project.
With the Azure project as the startup project, hitting F5 will build the package, deploy it to the emulator, start it up and attach the debugger.
I don't think you need to click "Debug" in emulator UI. I think the document may be wrong. Just clicked "F5" to launch your application from VS2013 if it's built in debug. Once the emulator was started and your application was running, you can begin to debug by adding breakpoint.
This might be a stupid question, but I have a problem with Visual Studio 2013 and IIS (not Express), that the Visual Studio debugger by default uses IIS Express (iisexpress.exe) to debug code. But I do not want that, but I want to use IIS installed on my computer (w3wp.exe).
I succeeded in debugging with IIS by using Attach to Process... and then selecting All Users and then picking w3wp.exe as a process. But I need to do this every time I start debugging. Is there a way to use IIS by default? In Visual Studio 2012, everything worked well, but in VS 2013 I cannot find an option to use IIS (w3wp.exe) by default.
I am debugging a Web Site ASP.NET 4.0.
Thanks for any help!
If your website project was opened via IIS, it should debug the IIS process automatically. If your site exists in IIS currently, you should be able to find it via File -> Open -> Web Site.
If you opened an IIS Express based website project (or via the file system, which uses IIS Express by default), then run the site through IIS, VS doesn't know that the site is running in IIS.
In order to get this working on my setup (VS2013, IIS7, Win7) I needed to go into IIS Management Console and manually enable Windows Authentication.