Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the debug port in Visual Studio 2017?

How to change debug port in Visual Studio 2017? I checked the property pages but to no avail.

like image 748
sojim2 Avatar asked Jun 12 '17 18:06

sojim2


People also ask

How do I change the port in Visual Studio?

In Solution Explorer, right-click the name of the web application and select Properties. Click the Web tab. In the Servers section, under dropdown selection for IIS Express, change the port number in the Project URL box. To the right of the Project URL box, click Create Virtual Directory, and then click OK.

On which port number debugger can be set?

The Remote Debugger Port on 32-bit Operating SystemsTCP 4024 (in Visual Studio 2019) is the main port, and is required for all scenarios. You can configure this from either the command line or the remote debugger window.

How do I check if a debug port is open?

Try opening a command prompt and enter "netstat -a" to see a list of ports that are currently in use on your machine. Then pick a port that's not in use.

How can change port number in VS code?

Yes, we can change live server port in vs code as per out choice. This can be very easily done by the following ways, Open up live server extension > Go to it's Extension Settings > Open up settings. json > Change the port.


2 Answers

For me, I was able to find it with the following steps in Visual Studio 2017:

  1. Right click on the web project, then click Properties.
  2. Click on the Debug tab.
  3. Under the Profile IIS Express, you will find the port at the App URL box.
like image 129
Kristianne Nerona Avatar answered Sep 30 '22 19:09

Kristianne Nerona


Go into the .sln file and edit the port there.

For example, if it's currently on port: 50722

Then just do a replace: 50722 replace with: 50723 and it should build just fine. There should be about 5 spots it'll replace.

like image 29
sojim2 Avatar answered Sep 30 '22 20:09

sojim2