Skip to content

Commit f06b129

Browse files
authored
Merge pull request #7461 from MicrosoftDocs/main637758148796638182
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents e1bdaf3 + 52a425b commit f06b129

17 files changed

+86
-56
lines changed

docs/debugger/debug-using-the-just-in-time-debugger.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Debug using the Just-In-Time Debugger | Microsoft Docs
33
description: Debug using the Just-In-Time Debugger in Visual Studio. Just-In-Time debugging can launch Visual Studio automatically when an app errors or crashes.
44
ms.custom: SEO-VS-2020
5-
ms.date: 08/24/2021
5+
ms.date: 12/20/2021
66
ms.topic: how-to
77
helpviewer_keywords:
88
- debugging [Visual Studio], Just-In-Time
@@ -50,23 +50,23 @@ Just-In-Time debugging may still be enabled even if Visual Studio is no longer i
5050

5151
1. From the Windows **Start** menu, run the **Registry Editor** (*regedit.exe*).
5252

53-
2. In the **Registry Editor** window, locate and delete the following registry entries:
53+
2. In the **Registry Editor** window for 64-bit computers, locate and delete the following registry entries:
5454

55-
- **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\\.NETFramework\DbgManagedDebugger**
55+
- **HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\\.NETFramework\DbgManagedDebugger**
5656

57-
- **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger**
57+
- **HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger**
5858

59-
![JIT registry key](../debugger/media/dbg-jit-registry.png "JIT registry key")
59+
:::image type="content" source="../debugger/media/dbg-jit-registry.png" alt-text="JIT registry key" border="true":::
6060

61-
3. If your computer is running a 64-bit operating system, also delete the following registry entries:
61+
3. If the following registry entries are present, or your computer is running a 32-bit operating system, delete the following entries:
6262

63-
- **HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\\.NETFramework\DbgManagedDebugger**
63+
- **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\\.NETFramework\DbgManagedDebugger**
6464

65-
- **HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger**
65+
- **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger**
6666

6767
Make sure not to delete or change any other registry keys.
6868

69-
5. Close the **Registry Editor** window.
69+
4. Close the **Registry Editor** window.
7070

7171
## Enable Just-In-Time debugging of a Windows Form
7272

@@ -93,6 +93,7 @@ To enable Just-In-Time debugging instead of standard Windows Form error handling
9393
For more information, see <xref:System.Diagnostics.DebuggableAttribute>.
9494

9595
## <a name="BKMK_Using_JIT"></a>Use Just-In-Time debugging
96+
9697
This example walks you through Just-In-Time debugging when an app throws an error.
9798

9899
- You must have Visual Studio installed to follow these steps. If you don't have Visual Studio, you can download the free [Visual Studio Community Edition](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=15).
@@ -125,7 +126,7 @@ For this example, you'll make a C# console app in Visual Studio that throws a [N
125126

126127
You should see the following command window:
127128

128-
![Screenshot of the console for ThrowsNullException.exe, which throws an unhandled null reference exception (System.NullReferenceException).](../debugger/media/throwsnullexceptionconsole.png)
129+
![Screenshot of the console for ThrowsNullException.exe, which throws an unhandled null reference exception (System.NullReferenceException).](../debugger/media/throws-null-exception-console.png)
129130

130131
1. The **Choose Just-In-Time Debugger** dialog opens.
131132

@@ -137,7 +138,7 @@ For this example, you'll make a C# console app in Visual Studio that throws a [N
137138

138139
The ThrowsNullException project opens in a new instance of Visual Studio, with execution stopped at the line that threw the exception:
139140

140-
![Screenshot of the ThrowsNullException project in Visual Studio, with highlighting of the line of source code that threw the exception.](../debugger/media/nullreferencesecondinstance.png)
141+
![Screenshot of the ThrowsNullException project in Visual Studio, with highlighting of the line of source code that threw the exception.](../debugger/media/null-reference-second-instance.png)
141142

142143
You can start debugging at this point. If you were debugging a real app, you would need to find out why the code is throwing the exception.
143144

@@ -152,19 +153,19 @@ If Just-In-Time debugging doesn't start when an app crashes, even though it is e
152153

153154
To fix this issue, use Registry Editor to add a **DWORD Value** of **Disabled**, with **Value data** of **1**, to the following registry keys:
154155

155-
- **HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting**
156-
157-
- (For 64-bit machines): **HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\Windows Error Reporting**
156+
- **HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\Windows Error Reporting**
157+
158+
- (For 32-bit machines) **HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting**
158159

159160
For more information, see [.WER settings](/windows/desktop/wer/wer-settings).
160161

161162
- A known Windows issue may be causing the Just-In-Time debugger to fail.
162163

163164
The fix is to add a **DWORD Value** of **Auto**, with **Value data** of **1**, to the following registry keys:
164165

165-
- **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug**
166+
- **HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug**
166167

167-
- (For 64-bit machines): **HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug**
168+
- (For 32-bit machines) **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug**
168169

169170
You might see the following error messages during Just-In-Time debugging:
170171

docs/debugger/how-to-set-debug-and-release-configurations.md

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Set debug and release configurations | Microsoft Docs
33
description: Set debug and release configurations in Visual Studio. You build the debug version for debugging and the release version for the final release distribution.
44
ms.custom: SEO-VS-2020
5-
ms.date: 10/05/2018
5+
ms.date: 12/21/2021
66
ms.topic: how-to
77
f1_keywords:
88
- vs.debug.builds
@@ -51,13 +51,13 @@ You can change the build configuration from the **Build** menu, from the toolbar
5151

5252
To change the build configuration, either:
5353

54-
* From the **Build** menu, select **Configuration Manager**, then select **Debug** or **Release**.
54+
* On the toolbar, choose either **Debug** or **Release** from the **Solution Configurations** list.
5555

56-
or
56+
![toolbars build configuration](../debugger/media/toolbar-build-configuration.png "ToolbarBuildConfiguration")
5757

58-
* On the toolbar, choose either **Debug** or **Release** from the **Solution Configurations** list.
58+
or
5959

60-
![toolbars build configuration](../debugger/media/toolbarbuildconfiguration.png "ToolbarBuildConfiguration")
60+
* From the **Build** menu, select **Configuration Manager**, then select **Debug** or **Release**.
6161

6262
## <a name="BKMK_symbols_release"></a>Generate symbol (.pdb) files for a build (C#, C++, Visual Basic, F#)
6363

@@ -68,49 +68,69 @@ You can choose to generate symbol (.pdb) files and what debug information to inc
6868
6969
Each project type may have a different way of setting these options.
7070

71-
### Generate symbol files for a C#, ASP.NET, or Visual Basic project
71+
::: moniker range=">=vs-2022"
72+
### Generate symbol files for a C# or ASP.NET Core project (.NET only)
7273

73-
For detailed information on project settings for debug configurations in C# or Visual Basic, see [Project settings for a C# debug configuration](../debugger/project-settings-for-csharp-debug-configurations.md) or [Project settings for a Visual Basic debug configuration](../debugger/project-settings-for-a-visual-basic-debug-configuration.md).
74+
For detailed information on project settings for debug configurations in C#, see [Project settings for a C# debug configuration](../debugger/project-settings-for-csharp-debug-configurations.md). (For .NET projects in Visual Basic, symbol files are configured the same as in .NET Framework.)
7475

75-
1. In Solution Explorer, select the project.
76+
1. In Solution Explorer, right-click the project and choose **Properties**.
7677

77-
2. Select the **Properties** icon (or press **Alt+Enter**).
78+
2. In the side pane, choose **Build** > **General**.
7879

79-
3. In the side pane, choose **Build** (or **Compile** in Visual Basic).
80+
3. In the **Optimize code** section, choose **Debug** or **Release**.
8081

81-
4. In the **Configuration** list, choose **Debug** or **Release**.
82+
4. In the **Debug symbols** list, choose **PDB file, current platform**, **PBD file, portable**, or **Embedded**.
8283

83-
5. Select the **Advanced** button (or the **Advanced Compile Options** button in Visual Basic).
84+
The portable format is the most recent cross-platform format for .NET Core. For more information on options, see [Advanced Build Settings dialog box (C#)](../ide/reference/advanced-build-settings-dialog-box-csharp.md).
85+
86+
![Generate PDBs for builds in .NET](../debugger/media/vs-2022/dbg-project-properties-pdb-dotnet.png "GeneratePDBsForDotNet")
87+
88+
5. Build your project.
89+
90+
The compiler creates the symbol file(s) in the same folder as the executable or the main output file.
91+
::: moniker-end
8492

85-
6. In the **Debugging information** list (or the **Generate debug info** list in Visual Basic), choose **Full**, **Pdb-only**, or **Portable**.
93+
### Generate symbol files for a C#, ASP.NET, or Visual Basic project (.NET Framework)
94+
95+
For detailed information on project settings for debug configurations in C# or Visual Basic, see [Project settings for a C# debug configuration](../debugger/project-settings-for-csharp-debug-configurations.md) or [Project settings for a Visual Basic debug configuration](../debugger/project-settings-for-a-visual-basic-debug-configuration.md).
96+
97+
1. In Solution Explorer, right-click the project and choose **Properties**.
98+
99+
2. In the side pane, choose **Build** (or **Compile** in Visual Basic).
100+
101+
3. In the **Configuration** list at the top, choose **Debug** or **Release**.
102+
103+
4. Select the **Advanced** button (or the **Advanced Compile Options** button in Visual Basic).
104+
105+
5. In the **Debugging information** list (or the **Generate debug info** list in Visual Basic), choose **Full**, **Pdb-only**, or **Portable**.
86106

87107
The portable format is the most recent cross-platform format for .NET Core. For more information on options, see [Advanced Build Settings dialog box (C#)](../ide/reference/advanced-build-settings-dialog-box-csharp.md).
88108

89-
![Generate PDBs for builds in C#](../debugger/media/dbg_project_properties_pdb_csharp.png "GeneratePDBsForCSharp")
109+
![Generate PDBs for builds in C#](../debugger/media/dbg-project-properties-pdb-csharp.png "GeneratePDBsForCSharp")
90110

91-
7. Build your project.
111+
6. Build your project.
92112

93113
The compiler creates the symbol file(s) in the same folder as the executable or the main output file.
94114

95115
### Generate symbol files for a C++ project
96116

97-
1. In Solution Explorer, select the project.
117+
1. In Solution Explorer, right-click the project and choose **Properties**.
98118

99-
2. Select the **Properties** icon (or press **Alt+Enter**).
119+
2. In the **Configuration** list, choose **Debug** or **Release**.
100120

101-
3. In the **Configuration** list, choose **Debug** or **Release**.
121+
3. In the side pane, choose **Linker > Debugging**, then select options for **Generate Debug Info**.
102122

103-
4. In the side pane, choose **Linker > Debugging**, then select options for **Generate Debug Info**.
123+
In most C++ projects, the default value is **Generate Debug Information (/DEBUG)**.
104124

105125
For detailed information on project settings for debug configurations in C++, see [Project settings for a C++ debug configuration](../debugger/project-settings-for-a-cpp-debug-configuration.md).
106126

107-
5. Configure options for **Generate Program Database Files**.
127+
4. Configure options for **Generate Program Database Files**.
108128

109129
In most C++ projects, the default value is `$(OutDir)$(TargetName).pdb`, which generates .pdb files in the output folder.
110130

111-
![Generate PDBs for builds in C++](../debugger/media/dbg_project_properties_pdb_cplusplus.png "GeneratePDBsforCPlusPlus")
131+
![Generate PDBs for builds in C++](../debugger/media/dbg-project-properties-pdb-cplusplus.png "GeneratePDBsforCPlusPlus")
112132

113-
6. Build your project.
133+
5. Build your project.
114134

115135
The compiler creates the symbol file(s) in the same folder as the executable or the main output file.
116136

docs/debugger/how-to-use-the-modules-window.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The **Symbol Status** column in the **Modules** window shows which modules have
5555

5656
1. If the symbols don't load, select **Symbol Settings** to open the **Options** dialog, and specify or change symbol loading locations.
5757

58-
You can download symbols from the public Microsoft Symbol Servers or other servers, or load symbols from a folder on your computer. For details, see [Specify symbol locations and loading behavior](../debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md#BKMK_Specify_symbol_locations_and_loading_behavior).
58+
You can download symbols from the public Microsoft Symbol Servers or other servers, or load symbols from a folder on your computer. For details, see [Configure location of symbol files and loading behavior](../debugger/specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md#configure-location-of-symbol-files-and-loading-options).
5959

6060
**To change symbol loading behavior settings:**
6161

-27.5 KB
Loading
Loading
Loading
Binary file not shown.
Binary file not shown.
Loading
Binary file not shown.
Loading
Binary file not shown.
Loading
-10.2 KB
Binary file not shown.
Loading

docs/debugger/navigating-through-code-with-the-debugger.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ To look at framework code, third-party library code, or system calls while debug
185185

186186
If you've loaded debugging symbols for Microsoft system code and disabled Just My Code, you can step into a system call just as you can any other call.
187187

188-
To learn about loading Microsoft symbols, see [Configure symbol locations and loading options](specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md#configure-symbol-locations-and-loading-options).
188+
To learn about loading Microsoft symbols, see [Configure location of symbol files and loading options](specify-symbol-dot-pdb-and-source-files-in-the-visual-studio-debugger.md#configure-location-of-symbol-files-and-loading-options).
189189

190190
**To load symbols for a specific system component**
191191

0 commit comments

Comments
 (0)