You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/debugger/debugger-tips-and-tricks.md
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ It's easy to view variables using debugger windows like the **Watch** window. Ho
79
79
80
80
5. Right-click the object ID variable and choose **Add Watch**.
81
81
82
-
For more information, see [Create an Object ID](https://docs.microsoft.com/en-us/visualstudio/debugger/watch-and-quickwatch-windows.md#bkmk_objectIds).
82
+
For more information, see [Create an Object ID](../debugger/watch-and-quickwatch-windows.md#bkmk_objectIds).
83
83
84
84
## View return values for functions
85
85
@@ -157,7 +157,10 @@ To find out how the debugger classifies code as user code, see [Just My Code](..
157
157
158
158
## Learn more
159
159
160
-
See this visual studio [blog post](https://blogs.msdn.microsoft.com/visualstudio/2017/06/26/7-lesser-known-hacks-for-debugging-in-visual-studio/) that describes some lesser known tips and tricks.
160
+
For additional tips and tricks and more detailed information, see these blog posts:
161
+
162
+
-[7 lesser known hacks for debugging in Visual Studio](https://blogs.msdn.microsoft.com/visualstudio/2017/06/26/7-lesser-known-hacks-for-debugging-in-visual-studio/)
163
+
-[7 hidden gems in Visual Studio](https://blogs.msdn.microsoft.com/visualstudio/2017/10/05/7-hidden-gems-in-visual-studio-2017/)
Copy file name to clipboardExpand all lines: docs/debugger/includes/remote-debugger-download.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,6 @@ translation.priority.ht:
32
32
>
33
33
> Surface 3 switched from ARM to x64 architecture. An ARM version of the remote tools is not available for Visual Studio 2017. For Visual Studio 2015, find the ARM version in the Visual Studio 2015 RTW download.
34
34
35
-
3. When you have finished downloading the executable, follow the directions to install the application on the remote computer. Follow the [setup instructions](#bkmk_setup).
35
+
3. When you have finished downloading the executable, go to the next section and follow setup instructions.
36
36
37
37
If you try to copy the remote debugger (msvsmon.exe) to the remote computer and run it, be aware that the **Remote Debugger Configuration Wizard** (**rdbgwiz.exe**) is installed only when you download the tools. You may need to use the wizard for configuration later, especially if you want the remote debugger to run as a service. For more information, see [(Optional) Configure the remote debugger as a service](../../debugger/remote-debugging.md#bkmk_configureService).
You should see the variable values changing as you iterate through the `for` loop.
106
106
107
-
If you are programming in native code, you may sometimes need to qualify the context of a variable name or an expression containing a variable name. The context is the function, source file, and module where a variable is located. If you have to do this, you can use the context operator syntax. For more information, see [Context Operator (C++)](../debugger/context-operator-cpp.md).
107
+
If you are programming in native code, you may sometimes need to qualify the context of a variable name or an expression containing a variable name. The context is the function, source file, and module where a variable is located. If you have to qualify the context, you can use the context operator syntax. For more information, see [Context Operator (C++)](../debugger/context-operator-cpp.md).
108
108
109
109
## Observing expressions with the Watch window
110
110
Now let's try using an expression instead. You can add any valid expression recognized by the debugger.
## <aname="bkmk_refreshWatch"></a> Refreshing Watch values that are out of date
121
-
In certain circumstances you might see a refresh icon (a circular arrow) when an expression is evaluated in the **Watch** window. For example, if you have property evaluation turned off (**Tools > Options > Debugging > Enable property evaluation and other implicit function calls**), and you have the following code:
121
+
In certain circumstances, you might see a refresh icon (a circular arrow) when an expression is evaluated in the **Watch** window. For example, if you have property evaluation turned off (**Tools > Options > Debugging > Enable property evaluation and other implicit function calls**), and you have the following code:
This indicates an error or a value that is out of date. You can generally refresh the value by clicking on the icon, but in some cases you might prefer not to refresh it. First you need to know why the value was not evaluated.
137
+
The preceding illustration shows an error or a value that is out of date. You can generally refresh the value by clicking on the icon, but in some cases you might prefer not to refresh it. First you need to know why the value was not evaluated.
138
138
139
139
If you point to the icon, a tooltip provides information about why the expression was not evaluated. If the circling arrows appear, the expression was not evaluated for one of the following reasons:
140
140
141
141
- An error occurred as the expression was being evaluated. For example, a time-out might have occurred, or a variable might have been out of scope.
142
142
143
-
- The expression contains a function call which could trigger a side effect in the application (see [Side Effects and Expressions](#bkmk_sideEffects)).
143
+
- The expression contains a function call, which could trigger a side effect in the application (see [Side Effects and Expressions](#bkmk_sideEffects)).
144
144
145
145
- Automatic evaluation of properties and implicit functions calls by the debugger is turned off (**Tools > Options > Debugging > Enable property evaluation and other implicit function calls**), and then the expression cannot be automatically evaluated.
146
146
147
-
To refresh the value, click the refresh icon or press the spacebar. The debugger will try to reevaluate the expression. If the refresh icon appeared because automatic evaluation of properties and other implicit function calls was turned off, the expression can be evaluated.
147
+
To refresh the value, click the refresh icon or press the spacebar. The debugger tries to reevaluate the expression. If the refresh icon appeared because automatic evaluation of properties and other implicit function calls was turned off, the expression can be evaluated.
148
148
149
149
If you see an icon that is a circle with two wavy lines that resemble threads, the expression was not evaluated because of a potential cross-thread dependency. In other words, evaluating the code requires other threads in your application to run temporarily. When you are in break mode, all threads in your application are typically stopped. Allowing other threads to run temporarily can have unexpected effects on the state of your program and causes the debugger to ignore events such as breakpoints and exceptions thrown on those threads.
This is called a [side effect](https://en.wikipedia.org/wiki/Side_effect_\(computer_science\)). Side effects can make debugging more difficult by changing the way your program operates.
158
+
This code can cause a [side effect](https://en.wikipedia.org/wiki/Side_effect_\(computer_science\)). Side effects can make debugging more difficult by changing the way your program operates.
159
159
160
-
An expression that is known to have side effects is evaluated only once, when you first enter it. Subsequent evaluations are disabled. You can manually override this behavior by clicking the update icon that appears next to the value.
160
+
An expression that is known to have side effects is evaluated only once, when you first enter it. Subsequent evaluations are disabled. You can manually override this behavior by clicking the update icon that appears next to the value.
161
161
162
162
One way to avoid all side effects is to turn off automatic function evaluation (**Tools > Options > Debugging > Enable property evaluation and other implicit function calls**).
163
163
164
164
When evaluation of properties or implicit function calls is turned off, you can force evaluation by using the **ac** format modifier (for C# only). See [Format Specifiers in C#](../debugger/format-specifiers-in-csharp.md).
165
165
166
166
## <aname="bkmk_objectIds"></a> Using Object IDs in the Watch window (C# and Visual Basic)
167
-
There are times when you want to observe the behavior of a specific object; for example, you might want to track an object referred to by a local variable after that variable has gone out of scope. In C# and Visual Basic, you can create object IDs for specific instances of reference types and use them in the Watch window and in breakpoint conditions. The object ID is generated by the common language runtime (CLR) debugging services and associated with the object.
167
+
168
+
There are times when you want to observe the behavior of a specific object. For example, you might want to track an object referred to by a local variable after that variable has gone out of scope. In C# and Visual Basic, you can create object IDs for specific instances of reference types and use them in the Watch window and in breakpoint conditions. The object ID is generated by the common language runtime (CLR) debugging services and associated with the object.
168
169
169
170
> [!NOTE]
170
171
> Object IDs create weak references, and do not prevent the object from being garbage collected. They are valid only for the current debugging session.
171
172
172
-
In the following code one method creates a `Person` using a local variable, but you want to find out what the `Person`'s name is in a different method:
173
+
In the following code, one method creates a `Person` using a local variable, but you want to find out what the `Person`'s name is in a different method:
173
174
174
175
```CSharp
175
176
classPerson
@@ -211,24 +212,24 @@ public class Program
211
212
212
213
2. Start debugging, and when execution stops in the breakpoint, find the variable in the **Locals** window, right-click it, and select **Make Object ID**.
213
214
214
-
3. You should see a **$** plus a number in the **Locals** window. This is the object ID.
215
+
3. You should see a **$** plus a number in the **Locals** window, which represents the object ID.
215
216
216
217
4. Add the object ID to the Watch window.
217
218
218
-
5. Set a breakpoint where you want to observe the object's behavior. In the code above, that would be in the `DoSomething()` method.
219
+
5. Set a breakpoint where you want to observe the object's behavior. In the preceding code, that would be in the `DoSomething()` method.
219
220
220
221
6. Continue debugging, and when execution stops in the `DoSomething()` method, the **Watch** window displays the `Person` object.
221
222
222
223
> [!NOTE]
223
-
> If you want to see the object's properties, such as `Person.Name` in the example above, you must have enabled property evaluation.
224
+
> If you want to see the object's properties, such as `Person.Name` in the example above, you must have enabled property evaluation.
224
225
225
226
## Using registers in the Watch window (C++ only)
226
227
If you are debugging native code, you can add register names as well as variable names using **$\<register name>** or **@\<register name>**. For more information, see [Pseudovariables](../debugger/pseudovariables.md).
227
228
228
229
## Dynamic View and the Watch window
229
-
Some scripting languages (e.g. JavaScript or Python) use dynamic or [duck typing](https://en.wikipedia.org/wiki/Duck_typing), and .NET languages (in version 4.0 and later) support objects that are difficult to observe using the normal debugging windows, because they may have runtime properties and methods that cannot be displayed.
230
+
Some scripting languages (for example, JavaScript or Python) use dynamic or [duck typing](https://en.wikipedia.org/wiki/Duck_typing), and .NET languages (in version 4.0 and later) support objects that are difficult to observe using the normal debugging windows, because they may have runtime properties and methods that cannot be displayed.
230
231
231
-
When the Watch window displays a or an object created from a type that implements the [IDynamicMetaObjectProvider Interface](https://docs.microsoft.com/en-us/dotnet/api/system.dynamic.idynamicmetaobjectprovider?view=netframework-4.7), the debugger adds a special **Dynamic View** node to the **Autos** display. This node shows the dynamic members of the dynamic object but does not allow editing of the member values.
232
+
When the Watch window displays an object created from a type that implements the [IDynamicMetaObjectProvider Interface](https://docs.microsoft.com/en-us/dotnet/api/system.dynamic.idynamicmetaobjectprovider?view=netframework-4.7), the debugger adds a special **Dynamic View** node to the **Autos** display. This node shows the dynamic members of the dynamic object but does not allow editing of the member values.
232
233
233
234
If you right-click any child of a **Dynamic View** and choose **Add Watch**, the debugger inserts a new watch variable that casts an object to a dynamic object. In other words, **object Name** becomes (**(dynamic)object).Name**.
Copy file name to clipboardExpand all lines: docs/ide/TOC.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
## [Synchronized Settings in Visual Studio](synchronized-settings-in-visual-studio.md)
9
9
# [Get Started Developing with Visual Studio](get-started-developing-with-visual-studio.md)
10
10
## [Getting Started with Visual C# and Visual Basic](getting-started-with-visual-csharp-and-visual-basic.md)
11
+
### [Quickstart: Create your first ASP.NET Core web app](../ide/quickstart-aspnet-core.md)
11
12
### [Walkthrough: Create a Simple Application with Visual C# or Visual Basic](walkthrough-create-a-simple-application-with-visual-csharp-or-visual-basic.md)
12
13
### [Tutorial 1: Create a Picture Viewer](tutorial-1-create-a-picture-viewer.md)
13
14
#### [Step 1: Create a Windows Forms Application Project](step-1-create-a-windows-forms-application-project.md)
0 commit comments