I still had my trusty native Azure Diagnostics and Trace information inside table storage and text files but i needed more. In no time at all i was stepping through my code in the cloud as if it was running locally, well almost.
One of the nice features added to the Azure SDK 2. What makes it especially appealing is the ease at which you can debug Web and Worker roles, deployed to Azure using Visual Studio and just how simple it is to setup, which if you attempted in earlier releases of the SDK, you will appreciate. Feel free to skip this section if you are familiar with the process and want to jump to the good stuff.
Having clicked 'OK' you will now have a cloud service project with two roles. Place your breakpoints in the desired locations, one in the worker and the other in the web controller as shown. Even though we haven't yet attached the debugger, it shows our intent for the next steps. Either select 'Sign In' or if the pop up window appears in the next screen shot appears use that. Once logged in, either create a new Cloud Service by selecting 'Create New' from the Cloud Service dropdown as shown below.
OR, select an existing Cloud Service if you created one previously as shown. The important step at this point is to select 'Debug' as the Build Configuration as shown. Select 'Enable Remote Debugging for all roles' as shown. We are now ready to publish.
Ensure the Remote Debugger is set to 'Enabled' as shown and select publish. The progress of the deployment is shown in the Azure activity log as shown.
Once complete, the staging link will change to a deployment link as shown. When the window appears, double-click User Rights Assignment , then find Log on as a service in the right pane. Double-click it. Add the user account to the Properties window and click OK. Click Next. Select the type of network that you want the remote tools to communicate with. At least one network type must be selected. If the computers are connected through a domain, you should choose the first item.
If the computers are connected through a workgroup or homegroup, you should choose the second or third items. The page also gives some tips to follow to get the service to start. At this point the remote debugger is running as a service. You should be able to debug your code with the symbols you generate on the Visual Studio computer. The performance of the remote debugger is much better when you use local symbols.
If you must use remote symbols, you need to tell the remote debugging monitor to look for symbols on the remote machine. You can find more information at. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No.
Any additional feedback? Download the version matching your device operating system x86, x64, or ARM On Windows Server, see Unblock the file download for help downloading the remote tools.
For the most recent version of the remote tools, open the Visual Studio doc. Tip For command line installation and command line reference, see the Help page for msvsmon. Important You can run the remote debugger under a user account that differs from the user account you are using on the Visual Studio computer, but you must add the different user account to the remote debugger's permissions.
Warning You can choose to run the remote tools in No Authentication mode, but this mode is strongly discouraged.
Submit and view feedback for This product This page. If Cloud Explorer is not available, open Server Explorer instead. This takes more time than deploying to an Azure App Service and requires that you follow the remaining steps in this tutorial. This article includes steps on setting up a basic configuration of IIS on Windows server and deploying the app from Visual Studio. These steps are included to make sure that the server has the required components installed, that the app can run correctly, and that you are ready to remote debug.
If your app is running in IIS and you just want to download the remote debugger and start debugging, go to Download and Install the remote tools on Windows Server.
If you want help to make sure that your app is set up, deployed, and running correctly in IIS so that you can debug, follow all the steps in this topic. Before you begin, follow all the steps described in Create a Windows Virtual Machine , which includes steps to install the IIS web server. Make sure you open port 80 in the Azure Network security group. When you verify that port 80 is open, also open the correct port for the remote debugger , , or That way, you won't have to open it later.
If you're using Web Deploy, also open port If Enhanced Security Configuration is enabled in Internet Explorer it is enabled by default , then you may need to add some domains as trusted sites to enable you to download some of the web server components.
Add the following domains. When you download the software, you may get requests to grant permission to load various web site scripts and resources. Some of these resources are not required, but to simplify the process, click Add when prompted. Install the. The bundle installs the. NET Core Runtime,. NET Core Module. For more in-depth instructions, see Publishing to IIS. For the current. NET Core 2, install the. In some scenarios, this is a fast way to deploy your app.
When you create the publish settings file, permissions are automatically set up in IIS. Deploy by publishing to a local folder and copying the output by a preferred method to a prepared app folder on IIS. This deployment method uses Web Deploy, which must be installed on the server. If you want to configure Web Deploy manually instead of importing the settings, you can install Web Deploy 3. However, if you configure Web Deploy manually, you will need to make sure that an app folder on the server is configured with the correct values and permissions see Configure ASP.
NET Web site. Open DefaultAppPool and set the. This is required for ASP. NET Core. Web Deploy 3. Web Deployment Agent Service is running the service name is different in older versions. If one of the agent services is not running, restart the Web Deployment Agent Service.
Choose to Change the installation and make sure that you choose Will be installed to the local hard drive for the Web Deploy components. Complete the change installation steps. If you don't see the Deploy menu, see the preceding section to verify that Web Deploy is running. In the Results panel, the output shows that access rights are granted to the specified user, and that a file with a.
Here are a few details about the values that you see:. The msdeploy. If, in later steps, you are unable to connect to the remote host from Visual Studio using the host name, test the server's IP address in place of the host name.
For detailed information, see Open ports to a virtual machine. On the computer where you have the ASP. Click New or Create new profile. In the Import Publish Settings File dialog, navigate to and select the profile that you created in the previous section, and click Open. Click Finish to save the publishing profile, and then click Publish. If you get an any deployment errors, click Edit to edit settings.
Modify settings and click Validate to test new settings. If you get an any deployment errors, click Settings to edit settings. After the app deploys successfully, it should start automatically.
For ASP. In the Settings dialog box, enable debugging by clicking Next , choose a Debug configuration, and then choose Remove additional files at destination under the File Publish options.
If you choose a Release configuration, you disable debugging in the web. You can use this option to deploy your app if you want to copy the app to IIS using PowerShell, RoboCopy, or you want to manually copy the files. NET Core project. If you're not using Web Deploy, you must publish and deploy the app using the file system or other tools. You can start by creating a package using the file system, and then either deploy the package manually or use other tools like PowerShell, Robocopy, or XCopy.
In this section, we assume you are manually copying the package if you are not using Web Deploy.
0コメント