The remote debugging feature needs to be turned on at the server side, which opens the TCP/IP ports required for the connection. Once the feature is turned on, a timer starts, and after 48 hours the feature is automatically turned off. This 48 hour limit is done for security and performance reasons. You can easily turn the feature back on as many times as you like, but we recommend keeping it disabled when not actively debugging.
Turning on the feature is done for you automatically if you are using the automatic Azure SDK method. Manual control of the remote debugging port can be found in the website’s configuration. Please refer to the tutorials below for explicit direction.
The first time you try to connect to the site, it sets up the connection paths, and if your site hasn’t been accessed for a while, the site is down it will spin it up. This means that it may take a few seconds the first time you connect. The instance Visual Studio first connects to will be the same instance that is connected to subsequently.
To know about this, click here,