Remote debugging Azure App Service with VS 2019 - visual-studio

How do I enable debugging from VS2019 for my .NET app running in an Azure App Service? The portal only supports 2015 and 2017.

You can just connect from Visual Studio 2019 and it should all work without changing the portal settings.
Open Visual Studio and your project
Open Cloud Explorer View -> Cloud Explorer or ctrl+\, ctrl+x
Find your App Service node in Cloud Explorer and select it
Choose Attach Debugger from the context menu or the actions pane

The VS 2019 option doesn't display in the "Classic" Application settings screen, you will need to use the new Configuration menu, then choose the "General Settings" tab when the blade opens.

Have you downloaded and installed the VS 2019 Remote Tools?
https://visualstudio.microsoft.com/downloads/?q=remote+tools#remote-tools-for-visual-studio-2019 (see the bottom of the page)
I had the same problem. I closed VS 2019 and installed the Remote Tools. When I relaunched, I went to Cloud Explorer and i now have the menu items I'm expecting.

You can also set the remote debugging version to "VS2019" through https://resources.azure.com.
You'll need to find the Web App e.g. from under Subscription name / resourceGroups / RG name / providers / Microsoft.Web / sites.
Then open config / web.
Switch from Read Only to Read/Write at the top if you didn't.
Click Edit.
Modify the version and enable debugging by settings these under "properties":
"remoteDebuggingEnabled": true,
"remoteDebuggingVersion": "VS2019"
Click PUT.

Related

How to open Visual Studio 2017 in debug mode with MS Edge instead of IE 11

I have a SharePoint hosted add-in project created using VS 2017 (v15.9.26) and want to run & debug the application using Microsoft Edge and NOT the default IE 11. Can anyone tell me how to do that ?
I know that if I have a "Web App" the option of "Browse with..." comes up as a option on the top FILE menu option... but that option is NOT available in my "SharePoint Add-in" project type.
Thank you.

.NET core - Publish page not showing on VS 2019 (version 16.3.4)

Since I updated Visual Studio Professional 2019 to latest version (16.3.4), I'm not able to publish my .NET Core console app to a folder anymore (I'm not using online services).
I used to right click on my executable project, click on "Publish" menu item, configure my publish profile in a dedicated window and then, of course, publish. This configuration was saved in a XML file in <myProjectFolder>\Properties\PublishProfiles\.
Now all I can see when I click on "Publish" menu item is the following empty page, from which I can do nothing, neither configure a publish profile nor actually publish.
Is there a way to fix this?

Unable to add browser in Visual Studio for Office App

Using Visual Studio Enterprise 2015 Update 3, I create a new project following these steps:
File -> New -> Project -> Templates/Visual C#/ Office/SharePoint/Apps
Choose App for Office (.NET Framework 4.5.2)
In Create app for Office window, Check Task pane and do Next
Check Excel, PowerPoint and Word and click Finish
After creating the solution, In Solution Explorer Window, Select the first project (manifest project) and look at the Properties Window.
If I click the Start Action drop down list, I can only see Chrome and Edge browsers (were installed before visual studio).
I have installed FireFox after visual studio and I'm not unable to add it to Start Action drop down list. I want to debug my Office App in FireFox as well.
How can I fix this issue?
An Office add-in running in desktop Office, which it is where it runs when you are debugging it with Visual Studio on a Windows machine, uses IE under the hood. (For more info, see what-browser-browser-engine-do-office-add-ins-use.) You can't change this. The Start Action setting has no effect. You are always using IE when you press F5. In particular, the Start Action of the manifest project is irrelevant because the manifest doesn't run or get loaded into a browser.
If you want to test the add-in in Office Online, you can sideload it, and when you run it, it will use whatever browser you used to open Office Online.

Visual Studio 2013 - JSLint.NET installed but not showing in tools?

I am new to VS.
Went to Extensions and installed JSLint.NET, it is also enabled.
But I get no item under Tools to configure or use it?
JSLint.NET is configured on per project basis. Right click on your project and you should see a menu choice for JSLint.NET Project Settings.
You can see an example of this on the Visual Studio gallery page for the extension.
JSLint.NET Extension

How to make IIS Express the default web server in Visual Studio?

Is there a way to set IIS Express as the default launch option in Visual Studio 2010 SP1? Currently, it uses Visual Studio Development Server by default and one has to execute "Use IIS Express..." command manually.
Right click on the Default Startup project file in your Solution explorer.
Select "Properties".
Click on the Web Tab on the left hand side
scroll down and select the "Use Local IIS Web server radio button
Tick the checkbox "Use IIS Express"
Another useful tid bit in the section is that you can tell IIS not to launch browsers when you debug and just wait for a browser process to hit it. This is really nice for cross-browser testing.
Just above the previous said section, look for a radio button titled "Don't open a page. Wait for a request from an external app" under Start Action section of the same page
EDIT:
To set all projects made to behave this way do the following:
Tools -> Options
Projects and Solutions
Web Projects
Tick "Use IIS Express for new file-based web sites and projects

Resources