Skip to content

Files

Latest commit

47c0916 · Dec 9, 2016

History

History
73 lines (54 loc) · 5.19 KB

vs-azure-tools-intellitrace-debug-published-cloud-services.md

File metadata and controls

73 lines (54 loc) · 5.19 KB
title description services documentationcenter author manager editor ms.assetid ms.service ms.devlang ms.topic ms.tgt_pltfrm ms.workload ms.date ms.author
Debugging a published cloud service with IntelliTrace and Visual Studio | Microsoft Docs
Debugging a published cloud service with IntelliTrace and Visual Studio
visual-studio-online
n/a
TomArcher
douge
5e6662fc-b917-43ea-bf2b-4f2fc3d213dc
visual-studio-online
multiple
article
multiple
na
11/11/2016
tarcher

Debugging a published cloud service with IntelliTrace and Visual Studio

Overview

With IntelliTrace, you can log extensive debugging information for a role instance when it runs in Azure. If you need to find the cause of a problem, you can use the IntelliTrace logs to step through your code from Visual Studio as if it were running in Azure. In effect, IntelliTrace records key code execution and environment data when your Azure application is running as a cloud service in Azure, and lets you replay the recorded data from Visual Studio. As an alternative, you can use remote debugging to attach directly to a cloud service that's running in Azure. See Debugging Cloud Services.

Important

IntelliTrace is intended for debug scenarios only, and should not be used for a production deployment.

[!NOTE] You can use IntelliTrace if you have Visual Studio Enterprise installed and your Azure application targets .NET Framework 4 or a later version. IntelliTrace collects information for your Azure roles. The virtual machines for these roles always run 64-bit operating systems.

To configure an Azure application for IntelliTrace

To enable IntelliTrace for an Azure application, you must create and publish the application from a Visual Studio Azure project. You must configure IntelliTrace for your Azure application before you publish it to Azure. If you publish your application without configuring IntelliTrace but then decide that you want to do that, you will have to publish the application again from Visual Studio. For more information, see Publishing a Cloud Service using the Azure Tools.

  1. When you are ready to deploy your Azure application, verify that your project build targets are set to Debug.

  2. Open the shortcut menu for the Azure project in Solution Explorer and choose Publish.

    The Publish Azure Application wizard appears.

  3. To collect IntelliTrace logs for your application when it is published in the cloud, select the Enable IntelliTrace check box.

    [!NOTE] You can enable either IntelliTrace or profiling when you publish your Azure application. You cannot enable both.

  4. To customize the basic IntelliTrace configuration, choose the Settings hyperlink.

    The IntelliTrace Settings dialog appears, as shown in the following figure. You can specify which events to log, whether to collect call information, which modules and processes to collect logs for, and how much space to allocate to the recording. For more information about IntelliTrace, see Debugging with IntelliTrace.

    VST_IntelliTraceSettings

The IntelliTrace log is a circular log file of the maximum size specified in the IntelliTrace settings (the default size is 250 MB). IntelliTrace logs are collected to a file in the file system of the virtual machine. When you request the logs, a snapshot is taken at that point in time and downloaded to your local computer.

After the Azure application has been published to Azure, you can determine if IntelliTrace has been enabled from the Azure Compute node in Server Explorer, as shown in the following image:

VST_DeployComputeNode

Downloading IntelliTrace Logs for a Role Instance

You can download IntelliTrace logs for a role instance from the Cloud Services node in Server Explorer. Expand the Cloud Services node until you locate the instance you are interested in, open the shortcut menu for this instance and choose View IntelliTrace Logs. The IntelliTrace logs are downloaded to a file in a directory on your local computer. Each time that you request the IntelliTrace logs, a new snapshot is created.

When the logs are downloaded, Visual Studio displays the progress of the operation in the Azure Activity Log window. As shown in the following figure, you can expand the line item for the operation to see more detail.

VST_IntelliTraceDownloadProgress

You can continue to work in Visual Studio while the IntelliTrace logs are downloading. When the log has finished downloading, it will automatically open in Visual Studio.

Note

The IntelliTrace logs might contain exceptions that the framework generates and subsequently handles. Internal framework code generates these exceptions as a normal part of starting up a role, so you may safely ignore them.

See Also

Debugging Cloud Services