Skip to content

Commit 9989865

Browse files
authored
Merge pull request #3089 from MicrosoftDocs/master636910335012482722
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents b3b4e9b + 19f19f8 commit 9989865

33 files changed

+197
-44
lines changed

docs/cross-platform/using-visual-studio-tools-for-unity.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ Note that the scenario described here assumes that you have the source code—th
186186

187187
2. Reference the correct Unity framework profile in the DLL project. In Visual Studio, in the DLL project's properties, set the **Target framework** property to the Unity framework version you're using. This is the Unity Base Class Library that matches the API compatibility that your project targets, such as the Unity full, micro, or web base class libraries. This prevents your DLL from calling framework methods that exist in other frameworks or compatibility levels, but which might not exist in the Unity framework version you're using.
188188

189+
> [!NOTE]
190+
> The following is only required if you are using Unity's legacy runtime. If you are using the new Unity runtime, you don't need to use those dedicated 3.5 profiles anymore. Use a .NET 4.x profile compatible with your Unity version.
191+
189192
![Set the DLL's target framework to Unity framework.](../cross-platform/media/vstu_debugging_dll_target_framework.png "vstu_debugging_dll_target_framework")
190193

191194
3. Copy the DLL to your Unity project's Asset folder. In Unity, assets are files that are packaged and deployed together with your Unity app so that they can be loaded at run-time. Since DLLs are linked at runtime, DLLs must be deployed as assets. To be deployed as an asset, the Unity Editor requires the DLLs to be put inside the Assets folder in your Unity project. There are two ways you can do this:
@@ -194,7 +197,9 @@ Note that the scenario described here assumes that you have the source code—th
194197

195198
- Modify the build settings of your DLL project to set its output folder to be the **Assets** folder of your Unity project. Both DLL and PDB files will be placed in the **Assets** folder.
196199

197-
The PDB files are needed for debugging because they contain the DLL's debugging symbols, and map the DLL code to its source code form. Visual Studio Tools for Unity will use information from the DLL and PDB to create a DLL.MDB file, which is the debug symbol format used by the Unity scripting engine.
200+
The PDB files are needed for debugging because they contain the DLL's debugging symbols, and map the DLL code to its source code form. If you are targeting the legacy runtime, Visual Studio Tools for Unity will use information from the DLL and PDB to create a DLL.MDB file, which is the debug symbol format used by the the legacy Unity scripting engine. If you are targeting the new runtime, and using Portable-PDB, Visual Studio Tools for Unity will not try to do any symbol conversion as the new Unity runtime is able to natively consume Portable-PDBs.
201+
202+
More information about PDB generation can be found [here](https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-set-debug-and-release-configurations?view=vs-2019). If you are targeting the new runtime, please make sure that "Debugging Information" is set to "Portable", in order to properly generate Portable-PDB. If you are targeting the legacy runtime, you need to use "Full".
198203

199204
4. Debug your code. You can now debug your DLL source code together with your Unity project's source code, and use all the debugging features you are used to, such as breakpoints and stepping through code.
200205

docs/data-tools/accessing-data-in-visual-studio.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In Visual Studio, you can create applications that connect to data in virtually
2121

2222
For applications in JavaScript, Python, PHP, Ruby, or C++, you connect to data like you do anything else, by obtaining libraries and writing code. For .NET applications, Visual Studio provides tools that you can use to explore data sources, create object models to store and manipulate data in memory, and bind data to the user interface. Microsoft Azure provides SDKs for .NET, Java, Node.js, PHP, Python, Ruby, and mobile apps, and tools in Visual Studio for connecting to Azure Storage.
2323

24-
The following lists show just a few of the many database and storage systems that can be used from Visual Studio. The [Microsoft Azure](https://azure.microsoft.com/) offerings are data services that include all provisioning and administration of the underlying data store. The **Azure development** workload in [Visual Studio 2017](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2017) enables you to work with Azure data stores directly from Visual Studio.
24+
The following lists show just a few of the many database and storage systems that can be used from Visual Studio. The [Microsoft Azure](https://azure.microsoft.com/) offerings are data services that include all provisioning and administration of the underlying data store. The **Azure development** workload in [Visual Studio 2017](https://visualstudio.microsoft.com/vs/older-downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=vs+2017+download) enables you to work with Azure data stores directly from Visual Studio.
2525

2626
![Azure development workload](media/azure-development-workload.png)
2727

docs/debugger/debug-live-azure-applications.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ In this tutorial, you will:
3030

3131
* Snapshot Debugger is only available for Visual Studio 2017 Enterprise version 15.5 or higher with the **Azure development workload**. (Under the **Individual components** tab, you find it under **Debugging and testing** > **Snapshot debugger**.)
3232

33-
If it's not already installed, install [Visual Studio 2017 Enterprise version 15.5](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2017) or later. If you are updating from a previous Visual Studio 2017 installation, run the Visual Studio Installer and check the Snapshot Debugger component in the **ASP.NET and web development workload**.
33+
If it's not already installed, install [Visual Studio 2017 Enterprise version 15.5](https://visualstudio.microsoft.com/vs/older-downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=vs+2017+download) or later. If you are updating from a previous Visual Studio 2017 installation, run the Visual Studio Installer and check the Snapshot Debugger component in the **ASP.NET and web development workload**.
3434

3535
* Basic or higher Azure App Service plan.
3636

docs/debugger/debug-live-azure-kubernetes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ In this tutorial, you will:
2929
3030
## Prerequisites
3131

32-
* Snapshot Debugger for Azure Kubernetes Services is only available for Visual Studio 2019 Enterprise preview or higher with the **Azure development workload**. (Under the **Individual components** tab, you find it under **Debugging and testing** > **Snapshot debugger**.)
32+
* Snapshot Debugger for Azure Kubernetes Services is only available for Visual Studio 2019 Enterprise or higher with the **Azure development workload**. (Under the **Individual components** tab, you find it under **Debugging and testing** > **Snapshot debugger**.)
3333

34-
If it's not already installed, install [Visual Studio 2019 Enterprise preview](https://visualstudio.microsoft.com/vs/preview/).
34+
If it's not already installed, install [Visual Studio 2019 Enterprise](https://visualstudio.microsoft.com/vs/).
3535

3636
* Snapshot collection is available for the following Azure Kubernetes Services web apps:
3737
* ASP.NET Core applications running on .NET Core 2.2 or later on Debian 9.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: "Time Travel Debugging live ASP.NET Azure virtual machines"
3+
description: "Learn how to record and replay live ASP.NET apps on Azure virtual machines using the Snapshot Debugger."
4+
ms.custom: ""
5+
ms.date: "04/11/2019"
6+
ms.topic: "conceptual"
7+
helpviewer_keywords:
8+
- "debugger"
9+
author: "poppastring"
10+
ms.author: "madownie"
11+
manager: andster
12+
monikerRange: '>= vs-2019'
13+
ms.workload:
14+
- "aspnet"
15+
- "azure"
16+
---
17+
# Record and replay live ASP.NET apps on Azure virtual machines using the Snapshot Debugger
18+
19+
The Time Travel Debugging (TTD) preview in Visual Studio Enterprise provides the ability to record a Web app running on a Azure Virtual Machine (VM) and then accurately reconstruct and replay the execution path. TTD integrates with our Snapshot Debugger offering and allows you to rewind and replay each line of code however many times you want, helping you isolate and identify problems that might only occur in production environments.
20+
21+
Capturing a TTD recording will not halt the application, however, recording will add significant overhead to your running process, slowing it down based on factors that include the process size and the number of active threads.
22+
23+
This feature is in preview for the release of Visual Studio 2019 with a go live license.
24+
25+
In this tutorial, you will:
26+
27+
> [!div class="checklist"]
28+
> * Start the Snapshot Debugger with Time Travel Debugging enabled
29+
> * Set a snappoint and Collect a Time Travel recording
30+
> * Start Debugging a Time Travel recording
31+
32+
## Prerequisites
33+
34+
* Time Travel Debugging for Azure Virtual Machines (VM) is only available for Visual Studio 2019 Enterprise or higher with the **Azure development workload**. (Under the **Individual components** tab, you find it under **Debugging and testing** > **Snapshot debugger**.)
35+
36+
If it's not already installed, install [Visual Studio 2019 Enterprise](https://visualstudio.microsoft.com/vs/).
37+
38+
* Time Travel Debugging is available for the following Azure VM web apps:
39+
* ASP.NET applications (AMD64) running on .NET Framework 4.8 or later.
40+
41+
## Open your project and start the Snapshot Debugger with Time Travel Debugging enabled
42+
43+
1. Open the project that you would like to Collect a Time Travel recording.
44+
45+
> [!IMPORTANT]
46+
> To start TTD, you need to open the *same version of source code* that is published to your Azure VM service.
47+
48+
1. Choose **Debug > Attach Snapshot Debugger...**. Select the Azure VM your web app is deployed to and an Azure storage account. Select the **Enable the Time Travel Debugging** preview option and then click **Attach**.
49+
50+
![Select Azure Resource](../debugger/media/time-travel-debugging-select-azure-resource-vm.png)
51+
52+
> [!IMPORTANT]
53+
> The first time you select **Attach Snapshot Debugger** for your VM, IIS is automatically restarted.
54+
55+
The metadata for the **Modules** will not initially be activated, navigate to the web app and the **Start Collection** button will become active. Visual Studio is now in snapshot debugging mode.
56+
57+
![Snapshot debugging mode](../debugger/media/snapshot-message.png)
58+
59+
> [!NOTE]
60+
> The Application Insights site extension also supports Snapshot Debugging. If you encounter a "site extension out of date" error message, see [troubleshooting tips and known issues for snapshot debugging](../debugger/debug-live-azure-apps-troubleshooting.md) for upgrading details.
61+
62+
The **Modules** window shows you when all the modules have loaded for the Azure VM (choose **Debug > Windows > Modules** to open this window).
63+
64+
![Check the Modules window](../debugger/media/snapshot-modules.png)
65+
66+
## Set a snappoint and Collect a Time Travel recording
67+
68+
1. In the code editor, click the left gutter in a method you are interested in to set a snappoint. Make sure it is code that you know will execute.
69+
70+
![Set a snappoint](../debugger/media/time-travel-debugging-set-snappoint-settings.png)
71+
72+
1. Right-click the snappoint icon (the hollow ball) and choose **Actions**. In the Snapshot Settings window click the **Action** check box. Then click the **Collect a time travel trace to the end of this method** check box.
73+
74+
![Collect a time travel trace to the end of the method](../debugger/media/time-travel-debugging-set-snappoint-action.png)
75+
76+
1. Click **Start Collection** to turn on the snappoint.
77+
78+
![Turn on the snappoint](../debugger/media/snapshot-start-collection.png)
79+
80+
## Take a snapshot
81+
82+
When a snappoint is turned on, it will capture a snapshot whenever the line of code where the snappoint is placed executes. This execution can be caused by a real request on your server. To force your snappoint to hit, go to the browser view of your web site and take any actions required that cause your snappoint to be hit.
83+
84+
## Start Debugging a Time Travel recording
85+
86+
1. When the snappoint is hit, a snapshot appears in the Diagnostic Tools window. To open this window, choose **Debug > Windows > Show Diagnostic Tools**.
87+
88+
![Open a snappoint](../debugger/media/snapshot-diagsession-window.png)
89+
90+
1. Click the View Snapshot link to open the Time Travel recording in the code editor.
91+
92+
You can execute every line of code recorded by the TTD by using the **Continue** and **Reverse Continue** buttons. Additionally the the Debug toolbar can be used to **Show Next Statement**, **Step Into**, **Step Over**, **Step Out**, **Step Back Into**, **Step Back Over**, **Step Back Out**.
93+
94+
![Start Debugging](../debugger/media/time-travel-debugging-step-commands.png)
95+
96+
You can also use the **Locals**, **Watches**, and **Call Stack** windows, and also evaluate expressions.
97+
98+
![Inspect snapshot data](../debugger/media/time-travel-debugging-start-debugging.png)
99+
100+
The website itself is still live and end users aren't impacted by any subsequent TTD activity. Only one snapshot is captured per snappoint by default: after a snapshot is captured the snappoint turns off. If you want to capture another snapshot at the snappoint, you can turn the snappoint back on by clicking **Update Collection**.
101+
102+
**Need help?** See the [Troubleshooting and known issues](../debugger/debug-live-azure-apps-troubleshooting.md) and [FAQ for snapshot debugging](../debugger/debug-live-azure-apps-faq.md) pages.
103+
104+
## Set a conditional snappoint
105+
106+
If it is difficult to recreate a particular state in your app, consider whether the use of a conditional snappoint can help. Conditional snappoints help you avoid collecting a Time Travel recording until the app enters a desired state, such as when a variable has a particular value that you want to inspect. [You can set conditions using expressions, filters, or hit counts](../debugger/debug-live-azure-apps-troubleshooting.md).
107+
108+
## Next steps
109+
110+
In this tutorial, you've learned how to collect a Time Travel recording for Azure Virtual Machines. You may want to read more details about Snapshot Debugger.
111+
112+
> [!div class="nextstepaction"]
113+
> [FAQ for snapshot debugging](../debugger/debug-live-azure-apps-faq.md)

docs/debugger/debug-live-azure-virtual-machines.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ In this tutorial, you will:
2929
3030
## Prerequisites
3131

32-
* Snapshot Debugger for Azure Virtual Machines (VM) and Azure Virtual Machine Scale Sets (VMSS) is only available for Visual Studio 2019 Enterprise preview or higher with the **Azure development workload**. (Under the **Individual components** tab, you find it under **Debugging and testing** > **Snapshot debugger**.)
32+
* Snapshot Debugger for Azure Virtual Machines (VM) and Azure Virtual Machine Scale Sets is only available for Visual Studio 2019 Enterprise or higher with the **Azure development workload**. (Under the **Individual components** tab, you find it under **Debugging and testing** > **Snapshot debugger**.)
3333

34-
If it's not already installed, install [Visual Studio 2019 Enterprise preview](https://visualstudio.microsoft.com/vs/preview/).
34+
If it's not already installed, install [Visual Studio 2019 Enterprise](https://visualstudio.microsoft.com/vs/).
3535

36-
* Snapshot collection is available for the following Azure VM/VMSS web apps:
36+
* Snapshot collection is available for the following Azure Virtual Machines\Virtual Machine Scale Sets web apps:
3737
* ASP.NET applications running on .NET Framework 4.6.1 or later.
3838
* ASP.NET Core applications running on .NET Core 2.0 or later on Windows.
3939

@@ -42,27 +42,27 @@ In this tutorial, you will:
4242
1. Open the project you would like to snapshot debug.
4343

4444
> [!IMPORTANT]
45-
> To snapshot debug, you need to open the *same version of source code* that is published to your Azure VM/VMSS service.
45+
> To snapshot debug, you need to open the *same version of source code* that is published to your Azure Virtual Machine\Virtual Machine Scale Set service.
4646
47-
1. Choose **Debug > Attach Snapshot Debugger...**. Select the Azure VM/VMSS your web app is deployed to and an Azure storage account, and then click **Attach**.
47+
1. Choose **Debug > Attach Snapshot Debugger...**. Select the Azure Virtual Machine\Virtual Machine Scale Set your web app is deployed to and an Azure storage account, and then click **Attach**.
4848

4949
![Launch the snapshot debugger from the Debug menu](../debugger/media/snapshot-debug-menu-attach.png)
5050

5151
![Select Azure Resource](../debugger/media/snapshot-select-azure-resource-vm.png)
5252

5353
> [!IMPORTANT]
5454
> The first time you select **Attach Snapshot Debugger** for your VM, IIS is automatically restarted.
55-
> The first time you select **Attach Snapshot Debugger** for your VMSS, requires the manual upgrade of each instance of the VMSS.
55+
> The first time you select **Attach Snapshot Debugger** for your Virtual Machine Scale Sets, requires the manual upgrade of each instance of the Virtual Machine Scale Sets.
5656
5757
The metadata for the **Modules** will not initially be activated, navigate to the web app and the **Start Collection** button will become active. Visual Studio is now in snapshot debugging mode.
5858

5959
![Snapshot debugging mode](../debugger/media/snapshot-message.png)
6060

6161
> [!NOTE]
6262
> The Application Insights site extension also supports Snapshot Debugging. If you encounter a "site extension out of date" error message, see [troubleshooting tips and known issues for snapshot debugging](../debugger/debug-live-azure-apps-troubleshooting.md) for upgrading details.
63-
> For VMSS the user is required to manually upgrade the instances in their VMSS after attaching the Snapshot Debugger for the first time.
63+
> For VMSS the user is required to manually upgrade the instances in their Virtual Machine Scale Sets after attaching the Snapshot Debugger for the first time.
6464
65-
The **Modules** window shows you when all the modules have loaded for the Azure VM/VMSS (choose **Debug > Windows > Modules** to open this window).
65+
The **Modules** window shows you when all the modules have loaded for the Azure Virtual Machine\Virtual Machine Scale Set (choose **Debug > Windows > Modules** to open this window).
6666

6767
![Check the Modules window](../debugger/media/snapshot-modules.png)
6868

docs/debugger/getting-started-with-the-debugger-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ You must have Visual Studio 2017 installed and the **Desktop development with C+
4040

4141
::: moniker-end
4242

43-
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/) page to install it for free.
43+
If you haven't already installed Visual Studio, go to the [Visual Studio downloads](https://visualstudio.microsoft.com/downloads/?utm_medium=microsoft&utm_source=docs.microsoft.com&utm_campaign=inline+link&utm_content=download+vs2019) page to install it for free.
4444

4545
If you need to install the workload but already have Visual Studio, go to **Tools** > **Get Tools and Features...**, which opens the Visual Studio Installer. The Visual Studio Installer launches. Choose the **Desktop development with C++** workload, then choose **Modify**.
4646

0 commit comments

Comments
 (0)