Visual Studio Community for Mac - Change browser from Safari to Chrome - visual-studio

In VS on windows I have the option to change which browser I debug with. On my Mac I'm not getting an option to change the browser.
Any ideas how I can do this?

Change your default browser to Chrome: It'll change in visual studio too.
go to:
apple icon on the top right -> system preferences -> General -> Default Web Browser: select Google Chrome (Drop down menu).

i've multiplets projects in my solution, when i changed the startup projects to more than one app , it allowed me to change the default debug app to what i want , changed the web app to edge and api app to the terminal
works like charm without changing the default web browser for the sysytem

Related

How to disable the new debug window in VS2017

I'm using Visual Studio 2017 RC and getting very frustrated with the new Chrome window that pops up when you click Debug.
Issues with the Debug Chrome Window:
Takes ages to start/"attach" website (I think it's attaching all the javascript debugging which I don't need because I use Chrome DevTools for that anyway)
Not dockable (as a tab) with other Chrome windows
Doesn't remember form history. If I'm testing out forms I can't autocomplete form data, so I have to type the whole lot out every time
Doesn't remember url history. If I'm testing a specific page on my site, I can't quickly select the url from Chrome url bar dropdown. Have to type the url in full
Extensions aren't enabled so I can't use my ruler or color picker extensions
Chrome window closes when debugging stops so I have to open up a new window to keep browsing the local site
Does anyone know how to disable this new Debug style window and go back to how it was in VS 2015?
I'm not sure if this came with the latest VS 2017 Update, but inside Debug -> Options you can disable it now.
Just uncheck the highlighted one:
For thoose, who have the 15.7 update and unchecking the JavaScript options doesn't do the trick, found a solution here:
https://blogs.msdn.microsoft.com/webdev/2016/11/21/client-side-debugging-of-asp-net-projects-in-google-chrome/
Tools > Options > Projects and Solutions > Web Projects, uncheck “Stop debugger when browser window is closed”
This is not an issue, rather a new feature in VS 2017. Previously we could only debug JS and TypeScript using IE in debug mode (of VS). But now they have introduced debugging JS and TS inside VS using Remote Debugging feature of Chrome. If you are running your application in debug mode (pressing F5) and Chrome is selected browser, Visual studio 2017 will try to open a remote debugging session with Chrome on a dedicated port. With remote debugging,
The browser is launched in plain mode, i.e. no extension and no history etc. Remote debuggin doesnt work with an existing instance of Chrome already running.
You always see this window for a while. At this point, VS is trying to attach the remote debugger to VS
To go back to VS 2015 experience of debugging, change the debugging target from Chrome to IIS Express.
This post describes this feature in detail. https://blogs.msdn.microsoft.com/webdev/2016/11/21/client-side-debugging-of-asp-net-projects-in-google-chrome/
A kind of quick work around is to press F5 and launch the debug
session and forget about the newly opened Chrome window. Go to your
normal Chrome instance and just open your site in new tab. You will
still be able to debug and do everything because IIS Express will
still be running your app at that port.
Update:
The answer given below by #Steveadoo is the right way going forward. The option shown in his screenshot controls how chrome is launched for debugging. Uncheck it if you want to stick to your regular Chrome instance.
Hope this helps.
For VS 2017, Go to Tools -> Options -> Projects and solutions-> web projects and uncheck the last option as shown in image.
Also you can refer here: https://www.johanbostrom.se/blog/how-to-disable-the-built-in-chrome-from-starting-when-debugging-in-visual-studio-2017
Here is the Microsoft blog about this new functionality, and how to revert.
https://blogs.msdn.microsoft.com/webdev/2016/11/21/client-side-debugging-of-asp-net-projects-in-google-chrome/
Here is the path I followed to disable:
Debug > Options > Debugging > General > (uncheck) Enable JavaScript debugging for ASP.Net (Chrome and IE).
In VS menu click:
Tools > Options > search for "browser projects" > untick the last option "Stop debugger when browser window is closed.
this will do the job.
Debug > Options > Debugging > General > (uncheck) Enable JavaScript debugging for ASP.Net (Chrome and IE).
Tools > Options > Projects and Solutions > Web Projects, uncheck “Stop debugger when browser window is closed”
works for me, visual studio professional 2017, v 15.7.3
I'm using Visual Studio 2017, and what worked for me is a combination of these two options:
Disable JavaScript debugging in Debug -> Options -> Debugging -> General Enable JavaScript debugging for ASP.Net.
Disable stop debugging when browser is closed in Debug -> Options -> Projects and Solutions -> Web Projects -> Stop debugger when browser windows is closed, close browser when debugging stops.
When I used only one of these two it did not work.
if you look to JavaScript case
For Enabling and Disabling JavaScript Debugging in VisualStudio is the same on all versions
Tools menu
Options...
Debugging -> General
Uncheck "Enable JavaScript debugging for ASP.NET"
In Visual Studio 2017:
If it prompts you again to turn JS debugger on again, choose another option (It will continue to prompt you if you have breakpoints in your script code):

How to show / unhide Web Essential bar from chrome?

I've checked autohide and the bar disappeared but now how can I see it again?
It's enough to press CTRL from inside Chrome.
To see the Web Essentials menu in Chrome when using Visual Studio 2015:
Ensure you've installed Web Essentials 2015 - https://visualstudiogallery.msdn.microsoft.com/ee6e6d8c-c837-41fb-886a-6b50ae2d06a2
Click the 'View in Browser' button in Visual Studio to view your site:
The Web Essentials menu will appear as an overlay at the bottom of your web page
Press CTRL in Chrome to toggle the Web Essentials menu on or off
CTRL works inside of Internet explorer as well.
Note that you have to have BrowserLink enabled. Otherwise Ctrl doesn't do anything.
Note, this feature is no longer available in Visual Studio 2017 update 3 as the author, madskristensen states:
It was removed for several reasons.
It interfered too much with the DOM of the running page
It didn't work when the various features were split out into their own extension
I build this Chrome extension to replace it
Link to image of evidence is below.(Not enough rep to show image on post)
Author of web essentials explaining why the tool bar is not suitable for the browser
Link to issue on github
There is a WebEssentials2015-Settings.json file which contains default settings for web essentials (e.g. for VS2015 it is \AppData\Roaming\Microsoft\VisualStudio\14.0\WebEssentials2015-Settings.json).
After I clicked autohide the only way for me to bring the web essentials menu back in the browsers was to edit this file setting the ShowMenu to true ("ShowMenu": true). That fixed the issue for me.
One note though, this file seems to be read on VS startup so you may need to restart VS to see the difference. Also these settings can be separately set for each solution (Web Essentials > Create solution settings). This option creates the .json file specific for given solution.

How to set IE as default browser for mvc3 application

I have set IE as my default browser but when I run the ASP.Net MVC3 application it opens by default IN Mozilla Firefox. How can I set that when I run the MVC3 application so it opens in IE by default instead?
If you are running the application from within Visual Studio you can right-click an html/aspx file outside of the Views directory and select 'Browse With'. From here you can change the browser that your app will launch with when you run the app from within Visual Studio.
You can't set the default for only a single application. You set the defaults for protocols. In this case, you want to set the default for http. The easiest way is to go into IE, goto the options menu (gear) > Internet Options > Programs tab > Set IE as the default
Just encountered this question, and while the other answers helped to a point, I found myself without any aspx pages in my mvc app.
Changing the default browser through internet settings didn't work, so in the end, I added a web form manually, right-clicked in and selected 'Browse With' and then was able to set the default from there.
Apparently from Visual Studio 2012 and up, you can choose it in the toolbar:
As explained in Visual Studio 2010 keeps changing my default browser:
In earlier versions, you could use a Visual Studio extension called World of VS Default Browser Switcher , as a solid workaround to the problem.
I found this tool where you can view your application either in IE, Chrome, Firefox, etc. Check it here: How to view your MVC Application in different browsers

Default Browser- Visual Web Developer Express 2010

I am trying to debug a Windows Azure WebRole which is an MVC3 project, but I want it to launch in any browser of my choice.
The Windows Azure is set as the Startup Project and launches the MVC3 project WebRole.
I am using Visual Studio Web Developer Express 2010.
I have previously stabbed in the dark by setting the following properties as in the image below but to no avail:
I then decided to set the project to not independently launch a page as above.
Is there a way to setup a default browser with the above scenario AND without changing my Windows default browser?
I've gotten around this in the past by adding in an ASPX or HTML page to the project and then right clicking it and selecting Browse With. You can then change the default browser in there without having to change your default browser within windows.
I haven't tried this with the Express edition however, but I don't see why they wouldn't include it in there.
You can delete the file afterwards and it will still retain the setting.
How about this:
WoVS Default Browser Switcher
http://visualstudiogallery.msdn.microsoft.com/bb424812-f742-41ef-974a-cdac607df921
You right on the page shown in solution explorer and then browse with whatever browser you want to set and add it as default browser.

How to launch silverlight with IE in Visual Studio while Google Chrome stays default for usual browsing

I cannot debug silverlight with Google Chrome. I don't want to change default browser to IE for my normal internet browsing.
How to only ask to run IE when running a silverlight project in Visual Studio ?
In Visual Studio you can specify the browser to use when running a web project. Right click on the start webpage in your web project and click on the Browse With option.
In the dialog that appears click on Chrome and set it to default.
This will not change you default browser in Windows.
Right Click on ClientBin it is in your Projectweb.and change the default browser or remove the un wanted browser then click ok. Thats it.
or
ProjectWeb->Browse with->change the default browser->ok
Or, just install the IETab extension for Chrome, then set it to automatically run the Silverlight page in IE mode.
https://chrome.google.com/webstore/detail/ie-tab/hehijbfgiekmjfkfjpbkbammjbdenadd

Resources