Skip to content

Commit a9b96ab

Browse files
committed
changes
1 parent 237d715 commit a9b96ab

7 files changed

+39
-41
lines changed

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

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ ms.workload:
1616
---
1717
# Debug using the Just-In-Time Debugger in Visual Studio
1818

19-
Just-In-Time debugging can launch Visual Studio automatically when an app running outside Visual Studio errors or crashes. Just-In-Time debugging lets you test apps outside of Visual Studio, and open Visual Studio to begin debugging where a problem occurs.
19+
Just-In-Time debugging can launch Visual Studio automatically when an app running outside Visual Studio errors or crashes. With Just-In-Time debugging, you can test apps outside of Visual Studio, and open Visual Studio to begin debugging when a problem occurs.
2020

21-
> [!TIP]
22-
> If you just want to stop the Just-In-Time Debugger dialog box from appearing, see [Disable the Just-In-Time Debugger](../debugger/just-in-time-debugging-in-visual-studio.md). If you once had Visual Studio installed, but no longer do, you may need to [disable Just-In-Time debugging from the Windows registry](#disable-just-in-time-debugging-from-the-windows-registry).
23-
24-
> [!NOTE]
2521
> Just-In-Time debugging works for Windows desktop apps. It does not work for Universal Windows Apps, or for managed code that is hosted in a native application, such as Visualizers.
2622
23+
> [!TIP]
24+
> If you just want to stop the Just-In-Time Debugger dialog box from appearing but don't have Visual Studio installed, see [Disable the Just-In-Time Debugger](../debugger/just-in-time-debugging-in-visual-studio.md). If you once had Visual Studio installed, you may need to [disable Just-In-Time debugging from the Windows registry](#disable-just-in-time-debugging-from-the-windows-registry).
25+
2726
## <a name="BKMK_Enabling"></a> Enable or disable Just-In-Time debugging in Visual Studio
2827

2928
>[!NOTE]
@@ -37,7 +36,7 @@ You can configure Just-In-Time debugging from the Visual Studio **Tools** > **Op
3736

3837
![Enable or disable JIT debugging](../debugger/media/dbg-jit-enable-or-disable.png "Enable or disable JIT debugging")
3938

40-
1. In the **Enable Just-In-Time debugging for these types of code** box, select the types of code you want Just-In-Time debugging to debug: **Managed**, **Native**, **Script**.
39+
1. In the **Enable Just-In-Time debugging for these types of code** box, select the types of code you want Just-In-Time debugging to debug: **Managed**, **Native**, and/or **Script**.
4140

4241
1. Select **OK**.
4342

@@ -121,45 +120,46 @@ For this example, you'll make a C# console app in Visual Studio that throws a [N
121120
>- If you select [Release](../debugger/how-to-set-debug-and-release-configurations.md) configuration, you must turn off [Just My Code](../debugger/just-my-code.md) for this procedure to work. Under **Tools** > **Options** > **Debugging**, deselect **Enable Just My Code**.
122121
For more information about build configurations, see [Understanding build configurations](../ide/understanding-build-configurations.md).
123122

124-
1. Open the built app, *ThrowsNullException.exe* in your C# project folder (*...\ThrowsNullException\ThrowsNullException\bin\Debug* or *...\ThrowsNullException\ThrowsNullException\bin\Release*).
123+
1. Open the built app *ThrowsNullException.exe* in your C# project folder (*...\ThrowsNullException\ThrowsNullException\bin\Debug* or *...\ThrowsNullException\ThrowsNullException\bin\Release*).
125124

126125
You should see the following command window:
127126

128127
![ThrowsNullExceptionConsole](../debugger/media/throwsnullexceptionconsole.png "ThrowsNullExceptionConsole")
129128

130-
After a few seconds, an error window appears:
131-
132-
![ThrowsNullExceptionError](../debugger/media/throwsnullexceptionerror.png "ThrowsNullExceptionError")
133-
134-
Do not click **Cancel**! After a few seconds, you should see two buttons, **Debug** and **Close program**. Select **Debug**.
135-
136-
> [!CAUTION]
137-
> If your application contains untrusted code, a security warning dialog box appears, enabling you to decide whether to proceed with debugging. Before you continue debugging, decide whether you trust the code. Did you write the code yourself? If the application is running on a remote machine, do you recognize the name of the process? If the app is running locally, consider the possibility of malicious code running on your computer. If you decide the code you are about to debug is trustworthy, select **Debug**. Otherwise, select **Don't Debug**.
138-
139-
1. The **Visual Studio Just-In-Time Debugger** dialog appears.
129+
1. The **Choose Just-In-Time Debugger** dialog opens.
140130

141131
![JustInTimeDialog](../debugger/media/justintimedialog.png "JustInTimeDialog")
142132

143-
Under **Possible Debuggers**, select **New instance of Microsoft Visual Studio <available version>** if not already selected.
133+
Under **Available Debuggers**, select **New instance of \<your preferred Visual Studio version/edition>**, if not already selected.
134+
135+
1. Select **OK**.
144136

145-
Under **Do you want to debug using the selected debugger**, select **Yes**.
137+
The ThrowsNullException project opens in a new instance of Visual Studio, with execution stopped at the line that threw the exception:
146138

147-
The ThrowsNullException project opens in a new instance of Visual Studio, with execution stopped at the line that throws the exception:
139+
![NullReferenceSecondInstance](../debugger/media/nullreferencesecondinstance.png "NullReferenceSecondInstance")
148140

149-
![NullReferenceSecondInstance](../debugger/media/nullreferencesecondinstance.png "NullReferenceSecondInstance")
141+
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.
150142

151-
You can start debugging at this point. If you were debugging a real application, you would need to find out why the code is throwing the exception.
143+
> [!CAUTION]
144+
> If your app contains untrusted code, a security warning dialog box appears, enabling you to decide whether to proceed with debugging. Before you continue debugging, decide whether you trust the code. Did you write the code yourself? If the application is running on a remote machine, do you recognize the name of the process? If the app is running locally, consider the possibility of malicious code running on your computer. If you decide the code is trustworthy, select **OK**. Otherwise, select **Cancel**.
152145
153146
## <a name="jit_errors"></a> Troubleshoot Just-In-Time debugging
154147

155-
If Just-In-Time debugging doesn't start when an app crashes, even though it is enabled in Visual Studio, Windows Error Reporting could be taking over the error handling on your computer.
156-
157-
To fix the issue, use Registry Editor to add a **DWORD Value** of **Disabled**, with **Value data** of **1**, to the following registry keys:
158-
159-
- **HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting**
160-
- (For 64-bit machines): **HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\Windows Error Reporting**
161-
162-
For more information, see [.WER settings](https://docs.microsoft.com/windows/desktop/wer/wer-settings).
148+
If Just-In-Time debugging doesn't start when an app crashes, even though it is enabled in Visual Studio:
149+
150+
- Windows Error Reporting could be taking over the error handling on your computer.
151+
152+
To fix this issue, use Registry Editor to add a **DWORD Value** of **Disabled**, with **Value data** of **1**, to the following registry keys:
153+
154+
- **HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting**
155+
- (For 64-bit machines): **HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\Windows Error Reporting**
156+
157+
For more information, see [.WER settings](https://docs.microsoft.com/windows/desktop/wer/wer-settings).
158+
159+
- A known Windows issue may be causing the Just-In-Time debugger to fail. The fix is to a **DWORD Value** of **Auto**, with **Value data** of **1**, to the following registry keys:
160+
161+
- **HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug**
162+
- (For 64-bit machines): **HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug**
163163

164164
You might see the following error messages during Just-In-Time debugging:
165165

docs/debugger/edit-and-continue-error-message-dialog-box.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ Possible reasons for this error message include:
4242
- Starting to debug an old version of an app, because the latest version has build errors.
4343

4444
For more information, see:
45-
- C++ Edit and Continue blog post](https://blogs.msdn.microsoft.com/vcblog/2016/07/01/c-edit-and-continue-in-visual-studio-2015-update-3/)
45+
- [C++ Edit and Continue blog post](https://blogs.msdn.microsoft.com/vcblog/2016/07/01/c-edit-and-continue-in-visual-studio-2015-update-3/)
4646
- [Supported code changes (C++)](../debugger/supported-code-changes-cpp.md)
4747
- [Edit and Continue](../debugger/edit-and-continue.md)

docs/debugger/how-to-enable-and-disable-edit-and-continue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ms.workload:
3030
---
3131
# How to: Enable and disable Edit and Continue (C#, VB, C++)
3232

33-
You can disable or enable **Edit and Continue** in the Visual Studio **Options** dialog box at design time. **Edit and Continue** works only in debug builds, but you can't enable or disable **Edit and Continue** while you're debugging. For more information, see [Edit and Continue](../debugger/edit-and-continue.md).
33+
You can disable or enable **Edit and Continue** in the Visual Studio **Options** dialog box at design time. **Edit and Continue** works only in debug builds. For more information, see [Edit and Continue](../debugger/edit-and-continue.md).
3434

3535
For native C++, **Edit and Continue** requires using the `/INCREMENTAL` option. For more information about feature requirements in C++, see this [blog post](https://blogs.msdn.microsoft.com/vcblog/2016/07/01/c-edit-and-continue-in-visual-studio-2015-update-3/) and [Edit and Continue (Visual C++)](../debugger/edit-and-continue-visual-cpp.md).
3636

@@ -46,7 +46,7 @@ For native C++, **Edit and Continue** requires using the `/INCREMENTAL` option.
4646
1. For C++ code, make sure **Enable Native Edit and Continue** is selected, and set the additional options:
4747
- **Apply changes on continue (Native only)**
4848

49-
If selected, Visual Studio automatically compiles and applies code changes when continuing from a break state. Otherwise, you can choose to apply changes using **Debug** > **Apply Code Changes**.
49+
If selected, Visual Studio automatically compiles and applies code changes when you continue debugging from a break state. Otherwise, you can choose to apply changes using **Debug** > **Apply Code Changes**.
5050

5151
- **Warn about stale code (Native only)**
5252

docs/debugger/how-to-use-edit-and-continue-csharp.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@ With Edit and Continue, you can make and apply changes to your code in break mod
2323

2424
Edit and Continue for C# happens automatically when you make code changes in break mode, then continue debugging by using **Continue**, **Step**, or **Set Next Statement**, or evaluate a function in a debugger window.
2525

26+
For more information, see [Edit and Continue (Visual C#)](../debugger/edit-and-continue-visual-csharp.md).
27+
2628
>[!NOTE]
27-
>Edit and Continue is not supported for optimized, mixed, or SQL Server common language runtime (CLR) integration code. For information on other unsupported scenarios, see [Supported code changes (C# and Visual Basic)](../debugger/supported-code-changes-csharp.md). If you try to Edit and Continue with one of these scenarios, a message box states that Edit and Continue is not supported.
29+
>Edit and Continue is not supported for optimized, mixed, or SQL Server common language runtime (CLR) integration code. For information on other unsupported scenarios, see [Supported code changes (C# and Visual Basic)](../debugger/supported-code-changes-csharp.md). If you try to Edit and Continue with one of these scenarios, a message box appears stating that Edit and Continue is not supported.
2830
2931
**To enable or disable Edit and Continue:**
3032

@@ -40,10 +42,6 @@ The setting takes effect when you start or restart the debugging session.
4042

4143
1. From the **Debug** menu, click **Continue**, **Step**, or **Set Next Statement**, or evaluate a function in a debugger window.
4244

43-
Debugging continues with the new, compiled code.
45+
Debugging continues with the new, compiled code.
4446

45-
Some types of code changes are not supported by Edit and Continue. For more information, see [Supported Code Changes (C# and Visual Basic)](../debugger/supported-code-changes-csharp.md).
46-
47-
## See also
48-
[Edit and Continue (Visual C#)](../debugger/edit-and-continue-visual-csharp.md)
49-
[Supported code changes (C# and Visual Basic)](../debugger/supported-code-changes-csharp.md)
47+
Some types of code changes are not supported by Edit and Continue. For more information, see [Supported code changes (C# and Visual Basic)](../debugger/supported-code-changes-csharp.md).

docs/debugger/just-in-time-debugging-in-visual-studio.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ms.workload:
1818

1919
The Just-In-Time Debugger dialog box may open when an error occurs in a running app, and prevent the app from continuing.
2020

21-
The Just-In-Time Debugger gives the option to launch Visual Studio or script debugging to debug the error. You must have [Visual Studio](http://visualstudio.microsoft.com) or another selected debugger installed to view detailed information about the error or try to debug it.
21+
The Just-In-Time Debugger gives you the option to launch Visual Studio to debug the error. You must have [Visual Studio](http://visualstudio.microsoft.com) or another selected debugger installed to view detailed information about the error or try to debug it.
2222

2323
If you're a Visual Studio user and want to try to debug the error, see [Debug using the Just-In-Time Debugger](../debugger/debug-using-the-just-in-time-debugger.md) and [Debugger basics](../debugger/getting-started-with-the-debugger.md). If you can't fix the error, or want to keep the Just-In-Time Debugger from opening, you can [disable Just-In-Time debugging from Visual Studio](debug-using-the-just-in-time-debugger.md#BKMK_Enabling).
2424

2.52 KB
Loading
Loading

0 commit comments

Comments
 (0)