Skip to content

Commit e9ab724

Browse files
authored
Merge pull request MicrosoftDocs#3931 from MicrosoftDocs/master637040126023242926
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 4aa6fed + 4991671 commit e9ab724

24 files changed

+150
-24
lines changed

docs/debugger/debugger-feature-tour.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,16 @@ When you press **Restart**, it saves time versus stopping the app and restarting
110110

111111
If you do want to stop the debugger and get back into the code editor, you can press the red stop ![Stop Debugging](../debugger/media/dbg-tour-stop-debugging.png "Stop Debugging") button instead of **Restart**.
112112

113+
## Edit your code and continue debugging (C#, VB, C++, XAML)
114+
115+
In most languages supported by Visual Studio, you can edit your code in the middle of a debugging session and continue debugging. To use this feature, click into your code with your cursor while paused in the debugger, make edits, and press **F5**, **F10**, or **F11** to continue debugging.
116+
117+
![Edit and continue debugging](../debugger/media/dbg-tips-edit-and-continue.gif "EditAndContinue")
118+
119+
For more information on using the feature and on feature limitations, see [Edit and Continue](../debugger/edit-and-continue.md).
120+
121+
To modify XAML code during a debugging session, see [Write and debug running XAML code with XAML Hot Reload](xaml-hot-reload.md).
122+
113123
## Inspect variables with data tips
114124

115125
Now that you know your way around a little, you have a good opportunity to start inspecting your app state (variables) with the debugger. Features that allow you to inspect variables are some of the most useful features of the debugger, and there are different ways to do it. Often, when you try to debug an issue, you are attempting to find out whether variables are storing the values that you expect them to have in a particular app state.

docs/debugger/debugger-tips-and-tricks.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ In most languages supported by Visual Studio, you can edit your code in the midd
3333

3434
For more information on using the feature and on feature limitations, see [Edit and Continue](../debugger/edit-and-continue.md).
3535

36+
## Edit XAML code and continue debugging
37+
38+
To modify XAML code during a debugging session, see [Write and debug running XAML code with XAML Hot Reload](xaml-hot-reload.md).
39+
3640
## Debug issues that are hard to reproduce
3741

3842
If it is difficult or time-consuming to recreate a particular state in your app, consider whether the use of a conditional breakpoint can help. You can use [conditional breakpoints](../debugger/using-breakpoints.md#BKMK_Specify_a_breakpoint_condition_using_a_code_expression) and filter breakpoints to avoid breaking into your app code until the app enters a desired state (such as a state in which a variable is storing bad data). You can set conditions using expressions, filters, hit counts, and so on.

docs/debugger/general-debugging-options-dialog-box.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Disables the JIT optimization of managed code when a module is loaded and JIT is
121121
Enables the script debugger for ASP.NET apps. On first use in Chrome, you may need to sign into the browser to enable Chrome extensions that you have installed. Disable this option to revert to legacy behavior.
122122

123123
**Enable Edge Developer Tools for UWP JavaScript Apps (Experimental)**:
124-
Enables developer tools for UWP JavaScript apps in Edge.
124+
Enables developer tools for UWP JavaScript apps in Microsoft Edge.
125125

126126
**Enable legacy Chrome JavaScript debugger for ASP.NET**:
127127
Enables the legacy Chrome JavaScript script debugger for ASP.NET apps. On first use in Chrome, you may need to sign into the browser to enable Chrome extensions that you have installed.
@@ -169,7 +169,7 @@ The Live Visual Tree and the Live Property Explore windows will appear when you
169169
Shows the **Live Visual Tree** commands in a toolbar on the main window of the XAML application that is being debugged. This option was introduced in Visual Studio 2015 Update 2.
170170

171171
- **Enable XAML Hot Reload**:
172-
Allows you to use the XAML hot reload feature with XAML code when your app is running. (This feature was previously called "XAML Edit and Continue")
172+
Allows you to use the XAML Hot Reload feature with XAML code when your app is running. (This feature was previously called "XAML Edit and Continue")
173173

174174
**Enable Diagnostic Tools while debugging**:
175175
The **Diagnostic Tools** window appears while you are debugging.

docs/debugger/inspect-xaml-properties-while-debugging.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,7 @@ You can use these XAML tools even when you don't have the source code. When you
9797
3. The application starts running.
9898

9999
4. In the second instance of Visual Studio, open the **Live Visual Tree** (**Debug > Windows > Live Visual Tree**). You should see the **TestXaml** UI elements, and you should be able to manipulate them as you did while debugging the application directly.
100+
101+
## See also
102+
103+
[Write and debug running XAML code with XAML Hot Reload](xaml-hot-reload.md)
5.85 KB
Loading
59.3 KB
Loading
8.23 KB
Loading
781 KB
Loading

docs/debugger/toc.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,12 @@
126126
href: edit-and-continue-visual-basic.md
127127
- name: Apply edits in break mode with Edit and Continue
128128
href: how-to-apply-edits-in-break-mode-with-edit-and-continue.md
129-
- name: Write and debug running XAML code
130-
href: xaml-hot-reload.md
129+
- name: XAML Hot Reload
130+
items:
131+
- name: Write and debug running XAML code
132+
href: xaml-hot-reload.md
133+
- name: Troubleshooting XAML Hot Reload
134+
href: xaml-hot-reload-troubleshooting.md
131135
- name: Edit and Continue not supported for F#
132136
href: edit-and-continue-not-supported-for-f-hash.md
133137
- name: View debugger data
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: "Troubleshooting XAML Hot Reload"
3+
description: "Fix problems that you may encounter with XAML Hot Reload."
4+
ms.date: "09/04/2019"
5+
ms.topic: troubleshooting
6+
helpviewer_keywords:
7+
- "xaml edit and continue, troubleshooting"
8+
- "xaml hot reload, troubleshooting"
9+
author: "mikejo5000"
10+
ms.author: "mikejo"
11+
manager: jillfra
12+
ms.workload:
13+
- "multiple"
14+
---
15+
# Troubleshooting XAML Hot Reload
16+
17+
This troubleshooting guide includes detailed instructions that should resolve most issues that prevent XAML Hot Reload from working correctly.
18+
19+
XAML Hot Reload is supported for WPF and UWP apps. For details on operating system and tooling requirements, see [Write and debug running XAML code with XAML Hot Reload](xaml-hot-reload.md).
20+
21+
## Hot Reload is not available
22+
23+
If you see the message "Hot Reload is not available" in the in-app toolbar while debugging your app, follow the instructions described in this article to resolve the issue.
24+
25+
## Verify that XAML Hot Reload is enabled
26+
27+
The feature is enabled by default. When you start debugging your app, make sure you see the in-app toolbar, which confirms that XAML Hot Reload is available:
28+
29+
![XAML Hot Reload available](../debugger/media/xaml-hot-reload-available.png)
30+
31+
If you do not see the in-app toolbar, then open **Debug** > **Options** > **General**. Make sure that both options, **Enable UI Debugging Tools for XAML** and **Enable XAML Hot Reload** are selected.
32+
33+
![Enable XAML Hot Reload](../debugger/media/xaml-hot-reload-enable.png)
34+
35+
If these options are selected, then go to Live Visual Tree (**Debug** > **Windows** > **Live Visual Tree**) and make sure that **Show runtime tools in application** toolbar button (on the far left) is selected.
36+
37+
![Enable XAML Hot Reload](../debugger/media/xaml-hot-reload-show-runtime-tools.png)
38+
39+
## Verify that you use Start Debugging rather than Attach to Process
40+
41+
XAML Hot Reload requires that the environment variable `ENABLE_XAML_DIAGNOSTICS_SOURCE_INFO` is set to 1 at the time application starts. Visual Studio sets this automatically as part of the **Debug** > **Start Debugging** (or **F5**) command. If you want to use XAML Hot Reload with the **Debug** > **Attach to Process** command instead, then set the environment variable yourself.
42+
43+
## Verify that your MSBuild properties are correct
44+
45+
By default, source info is included in a Debug configuration. It is controlled by MSBuild properties in your project files (such as *.csproj). For WPF, the property is `XamlDebuggingInformation`, which must be set to `True`. For UWP, the property is `DisableXbfLineInfo`, which must be set to `False`. For example:
46+
47+
WPF:
48+
49+
`<XamlDebuggingInformation>True</XamlDebuggingInformation>`
50+
51+
UWP:
52+
53+
`<DisableXbfLineInfo>False</DisableXbfLineInfo>`
54+
55+
## Verify that you are using the correct build configuration name
56+
57+
You must either manually set the correct MSBuild property to support XAML Hot Reload (see previous section), or you must use the default build configuration name (Debug). If you don't set the MSBuild property correctly, a custom build configuration name won't work, nor will a Release build.
58+
59+
## Verify that your XAML file has no errors
60+
61+
If your XAML file shows errors in the **Error List**, then XAML Hot Reload may not work.
62+
63+
## See also
64+
65+
[Write and debug running XAML code with XAML Hot Reload](xaml-hot-reload.md)

0 commit comments

Comments
 (0)