Skip to content

Instantly share code, notes, and snippets.

@leachdaniel
Last active June 27, 2018 15:16
Show Gist options
  • Save leachdaniel/582349e281232732e96883b524ab7472 to your computer and use it in GitHub Desktop.
Save leachdaniel/582349e281232732e96883b524ab7472 to your computer and use it in GitHub Desktop.
Visual Studio Browse With for Web Services Settings Using Powershell

Update - this no longer works with recent updates to Visual Studio

Visual Studio Browse With for Web Services Settings Using Powershell

Background

By default, Visual Studio 2017 and most prior versions open up a web browser session every time you start a web api or mvc application. This can be annoying if you are trying to debug a web service API. The following steps add "Browser" that's just a powershell api call to initialize the web service.

Steps

  • Click the dropdown next to the green play button.
  • Select Browse With
  • Click Add
  • Enter the following:
Program: c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
Arguments: -NoProfile -NonInteractive -Command iwr -UseBasicParsing -Uri
Friendly Name: Powershell Init
  • Click set as default (optional)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment