Skip to content

Commit 04343d3

Browse files
authored
Merge pull request #2552 from MicrosoftDocs/master636857666396743772
For protected CLA branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 5cd8b17 + fdf21f4 commit 04343d3

File tree

6 files changed

+151
-140
lines changed

6 files changed

+151
-140
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,4 +355,7 @@ _themes.VS.Modern/
355355
*.sln.docstates
356356

357357
# User-specific files (MonoDevelop/Xamarin Studio)
358-
*.userprefs
358+
*.userprefs
359+
360+
# Folder configuration on Mac
361+
.DS_Store

docs/code-quality/install-fxcop-analyzers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Use the following guidelines to determine which version of the FxCop analyzers p
3737

3838
| Visual Studio version | FxCop analyzer package version |
3939
| - | - |
40-
| Visual Studio 2017 version 15.5 and later | 2.6.2, for example https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/2.6.2 |
40+
| Visual Studio 2017 version 15.5 and later | 2.6.3, for example https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/2.6.3 |
4141
| Visual Studio 2017 version 15.3 to 15.4 | 2.3.0-beta1, for example https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/2.3.0-beta1 |
4242
| Visual Studio 2017 version 15.0 to 15.2 | 2.0.0-beta2, for example https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/2.0.0-beta2 |
4343
| Visual Studio 2015 update 2 and 3 | Version 1.2.0-beta2, for example https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers/1.2.0-beta2 |

docs/debugger/just-my-code.md

Lines changed: 127 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Debug user code with Just My Code | Microsoft Docs"
3-
ms.date: "10/22/2018"
3+
ms.date: "02/13/2019"
44
ms.topic: "conceptual"
55
ms.assetid: 0f0df097-bbaf-46ad-9ad1-ef5f40435079
66
author: "mikejo5000"
@@ -76,25 +76,25 @@ If an unhandled exception occurs in non-user code, the debugger breaks at the us
7676
If first chance exceptions are enabled for the exception, the calling user-code line is highlighted in green in source code. The **Call Stack** window displays the annotated frame labeled **[External Code]**.
7777

7878
## <a name="BKMK_C___Just_My_Code"></a> C++ Just My Code
79-
80-
In C++, enabling Just My Code is the same as using the [/JMC (Just my code debugging)](/cpp/build/reference/jmc) compiler switch.
79+
80+
Starting in Visual Studio 2017 version 15.8, Just My Code for code stepping is also supported. This feature also requires use of the [/JMC (Just my code debugging)](/cpp/build/reference/jmc) compiler switch. The switch is enabled by default. For **Call Stack** window and call stack support in Just My Code, the /JMC switch is not required.
8181

8282
<a name="BKMK_CPP_User_and_non_user_code"></a>
83-
Just My Code is different in C++ than in .NET Framework and JavaScript, because you can specify non-user files separately for stepping behavior and the **Call Stack** window.
84-
85-
Just My Code in C++ considers only these functions to be non-user code:
86-
87-
- For the **Call Stack** window:
83+
To be classified as user code, the PDB for the binary containing the user code must be loaded by the debugger (use the **Modules** window to check this).
8884

89-
- Functions with stripped source information in their symbols file.
90-
- Functions where the symbol files indicate that there is no source file corresponding to the stack frame.
91-
- Functions specified in *\*.natjmc* files in the *%VsInstallDirectory%\Common7\Packages\Debugger\Visualizers* folder.
85+
For call stack behavior, such as in the **Call Stack** window, Just My Code in C++ considers only these functions to be *non-user code*:
9286

93-
- For stepping behavior:
87+
- Functions with stripped source information in their symbols file.
88+
- Functions where the symbol files indicate that there is no source file corresponding to the stack frame.
89+
- Functions specified in *\*.natjmc* files in the *%VsInstallDirectory%\Common7\Packages\Debugger\Visualizers* folder.
90+
91+
For code stepping behavior, Just My Code in C++ considers only these functions to be *non-user code*:
92+
93+
- Functions for the which the corresponding PDB file has not been loaded in the debugger.
94+
- Functions specified in *\*.natjmc* files in the *%VsInstallDirectory%\Common7\Packages\Debugger\Visualizers* folder.
9495

95-
- Functions specified in *\*.natstepfilter* files in the *%VsInstallDirectory%\Common7\Packages\Debugger\Visualizers* folder.
96-
97-
You can create *.natstepfilter* and *.natjmc* files to customize Just My Code stepping behavior and the **Call Stack** window. See [Customize C++ stepping behavior](#BKMK_CPP_Customize_stepping_behavior) and [Customize C++ call stack behavior](#BKMK_CPP_Customize_call_stack_behavior).
96+
> [!NOTE]
97+
> For code stepping support in Just My Code, C++ code must be compiled using the MSVC compilers in Visual Studio 15.8 Preview 3 or later, and the /JMC compiler switch must be enabled (it is enabled by default). For additional details, see [Customize C++ call stack and code stepping behavior](#BKMK_CPP_Customize_call_stack_behavior)) and this [blog post](https://blogs.msdn.microsoft.com/vcblog/2018/06/29/announcing-jmc-stepping-in-visual-studio/). For code compiled using an older compiler, *.natstepfilter* files are the only way to customize code stepping, which is independent of Just My Code. See [Customize C++ stepping behavior](#BKMK_CPP_Customize_stepping_behavior).
9898
9999
<a name="BKMK_CPP_Stepping_behavior"></a>
100100
During C++ debugging:
@@ -106,118 +106,118 @@ If there's no more user code, debugging continues until it ends, hits another br
106106

107107
If the debugger breaks in non-user code (for example, you use **Debug** > **Break All** and pause in non-user code), stepping continues in the non-user code.
108108

109-
If the debugger hits an exception, it stops on the exception, whether it is in user or non-user code. **User-unhandled** options in the **Exception Settings** dialog box are ignored.
110-
111-
### <a name="BKMK_CPP_Customize_stepping_behavior"></a> Customize C++ stepping behavior
112-
113-
In C++ projects, you can specify functions to step over by listing them as non-user code in *\*.natstepfilter* files.
114-
115-
- To specify non-user code for all local Visual Studio users, add the *.natstepfilter* file to the *%VsInstallDirectory%\Common7\Packages\Debugger\Visualizers* folder.
116-
- To specify non-user code for an individual user, add the *.natstepfilter* file to the *%USERPROFILE%\My Documents\Visual Studio 2017\Visualizers* folder.
117-
118-
A *.natstepfilter* file is an XML file with this syntax:
119-
120-
```xml
121-
<?xml version="1.0" encoding="utf-8"?>
122-
<StepFilter xmlns="http://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010">
123-
<Function>
124-
<Name>FunctionSpec</Name>
125-
<Action>StepAction</Action>
126-
</Function>
127-
<Function>
128-
<Name>FunctionSpec</Name>
129-
<Module>ModuleSpec</Module>
130-
<Action>StepAction</Action>
131-
</Function>
132-
</StepFilter>
133-
134-
```
135-
136-
|Element|Description|
137-
|-------------|-----------------|
138-
|`Function`|Required. Specifies one or more functions as non-user functions.|
139-
|`Name`|Required. An ECMA-262 formatted regular expression specifying the full function name to match. For example:<br /><br /> `<Name>MyNS::MyClass.*</Name>`<br /><br /> tells the debugger that all methods in `MyNS::MyClass` are to be considered non-user code. The match is case-sensitive.|
140-
|`Module`|Optional. An ECMA-262 formatted regular expression specifying the full path to the module containing the function. The match is case-insensitive.|
141-
|`Action`|Required. One of these case-sensitive values:<br /><br /> `NoStepInto` - tells the debugger to step over the function.<br /> `StepInto` - tells the debugger to step into the function, overriding any other `NoStepInto` for the matched function.|
142-
143-
### <a name="BKMK_CPP_Customize_call_stack_behavior"></a> Customize C++ call stack behavior
144-
145-
For C++ projects, you can specify the modules, source files, and functions the **Call Stack** window treats as non-user code by specifying them in *\*.natjmc* files.
146-
147-
- To specify non-user code for all users of the Visual Studio machine, add the *.natjmc* file to the *%VsInstallDirectory%\Common7\Packages\Debugger\Visualizers* folder.
148-
- To specify non-user code for an individual user, add the *.natjmc* file to the *%USERPROFILE%\My Documents\Visual Studio 2017\Visualizers* folder.
149-
150-
A *.natjmc* file is an XML file with this syntax:
151-
152-
```xml
153-
<?xml version="1.0" encoding="utf-8"?>
154-
<NonUserCode xmlns="http://schemas.microsoft.com/vstudio/debugger/jmc/2015">
155-
156-
<!-- Modules -->
157-
<Module Name="ModuleSpec" />
158-
<Module Name="ModuleSpec" Company="CompanyName" />
159-
160-
<!-- Files -->
161-
<File Name="FileSpec"/>
162-
163-
<!-- Functions -->
164-
<Function Name="FunctionSpec" />
165-
<Function Name="FunctionSpec" Module ="ModuleSpec" />
166-
<Function Name="FunctionSpec" Module ="ModuleSpec" ExceptionImplementation="true" />
167-
168-
</NonUserCode>
169-
170-
```
171-
172-
**Module element attributes**
173-
174-
|Attribute|Description|
175-
|---------------|-----------------|
176-
|`Name`|Required. The full path of the module or modules. You can use the Windows wildcard characters `?` (zero or one character) and `*` (zero or more characters). For example,<br /><br /> `<Module Name="?:\3rdParty\UtilLibs\*" />`<br /><br /> tells the debugger to treat all modules in *\3rdParty\UtilLibs* on any drive as external code.|
177-
|`Company`|Optional. The name of the company that publishes the module that is embedded in the executable file. You can use this attribute to disambiguate the modules.|
178-
179-
**File element attributes**
180-
181-
|Attribute|Description|
182-
|---------------|-----------------|
183-
|`Name`|Required. The full path of the source file or files to treat as external code. You can use the Windows wildcard characters `?` and `*` when specifying the path.|
184-
185-
**Function element attributes**
186-
187-
|Attribute|Description|
188-
|---------------|-----------------|
189-
|`Name`|Required. The fully qualified name of the function to treat as external code.|
190-
|`Module`|Optional. The name or full path to the module that contains the function. You can use this attribute to disambiguate functions with the same name.|
191-
|`ExceptionImplementation`|When set to `true`, the call stack displays the function that threw the exception rather than this function.|
192-
193-
## <a name="BKMK_JavaScript_Just_My_Code"></a> JavaScript Just My Code
194-
195-
<a name="BKMK_JS_User_and_non_user_code"></a>
196-
JavaScript Just My Code controls stepping and call stack display by categorizing code in one of these classifications:
197-
198-
|||
199-
|-|-|
200-
|**MyCode**|User code that you own and control.|
201-
|**LibraryCode**|Non-user code from libraries that you use regularly and your app relies on to function correctly (for example WinJS or jQuery).|
202-
|**UnrelatedCode**|Non-user code in your app that you don't own and your app doesn't rely on to function correctly. For example, an advertising SDK that displays ads could be UnrelatedCode. In UWP projects, any code that is loaded into your app from an HTTP or HTTPS URI is also considered UnrelatedCode.|
203-
204-
The JavaScript debugger classifies code as user or non-user in this order:
205-
206-
1. The default classifications.
207-
- Script executed by passing a string to the host-provided `eval` function is **MyCode**.
208-
- Script executed by passing a string to the `Function` constructor is **LibraryCode**.
209-
- Script in a framework reference, such as WinJS or the Azure SDK, is **LibraryCode**.
210-
- Script executed by passing a string to the `setTimeout`, `setImmediate`, or `setInterval` functions is **UnrelatedCode**.
211-
212-
2. Classifications specified for all Visual Studio JavaScript projects in the *%VSInstallDirectory%\JavaScript\JustMyCode\mycode.default.wwa.json* file.
213-
214-
3. Classifications in the *mycode.json* file of the current project.
215-
216-
Each classification step overrides the previous steps.
217-
218-
All other code is classified as **MyCode**.
219-
220-
You can modify the default classifications, and classify specific files and URLs as user or non-user code, by adding a *.json* file named *mycode.json* to the root folder of a JavaScript project. See [Customize JavaScript Just My Code](#BKMK_JS_Customize_Just_My_Code).
109+
If the debugger hits an exception, it stops on the exception, whether it is in user or non-user code. **User-unhandled** options in the **Exception Settings** dialog box are ignored.
110+
111+
### <a name="BKMK_CPP_Customize_call_stack_behavior"></a> Customize C++ call stack and code stepping behavior
112+
113+
For C++ projects, you can specify the modules, source files, and functions the **Call Stack** window treats as non-user code by specifying them in *\*.natjmc* files. This customization also applies to code stepping if you are using the latest compiler (see [C++ Just My Code](#BKMK_CPP_User_and_non_user_code)).
114+
115+
- To specify non-user code for all users of the Visual Studio machine, add the *.natjmc* file to the *%VsInstallDirectory%\Common7\Packages\Debugger\Visualizers* folder.
116+
- To specify non-user code for an individual user, add the *.natjmc* file to the *%USERPROFILE%\My Documents\Visual Studio 2017\Visualizers* folder.
117+
118+
A *.natjmc* file is an XML file with this syntax:
119+
120+
```xml
121+
<?xml version="1.0" encoding="utf-8"?>
122+
<NonUserCode xmlns="http://schemas.microsoft.com/vstudio/debugger/jmc/2015">
123+
124+
<!-- Modules -->
125+
<Module Name="ModuleSpec" />
126+
<Module Name="ModuleSpec" Company="CompanyName" />
127+
128+
<!-- Files -->
129+
<File Name="FileSpec"/>
130+
131+
<!-- Functions -->
132+
<Function Name="FunctionSpec" />
133+
<Function Name="FunctionSpec" Module ="ModuleSpec" />
134+
<Function Name="FunctionSpec" Module ="ModuleSpec" ExceptionImplementation="true" />
135+
136+
</NonUserCode>
137+
138+
```
139+
140+
**Module element attributes**
141+
142+
|Attribute|Description|
143+
|---------------|-----------------|
144+
|`Name`|Required. The full path of the module or modules. You can use the Windows wildcard characters `?` (zero or one character) and `*` (zero or more characters). For example,<br /><br /> `<Module Name="?:\3rdParty\UtilLibs\*" />`<br /><br /> tells the debugger to treat all modules in *\3rdParty\UtilLibs* on any drive as external code.|
145+
|`Company`|Optional. The name of the company that publishes the module that is embedded in the executable file. You can use this attribute to disambiguate the modules.|
146+
147+
**File element attributes**
148+
149+
|Attribute|Description|
150+
|---------------|-----------------|
151+
|`Name`|Required. The full path of the source file or files to treat as external code. You can use the Windows wildcard characters `?` and `*` when specifying the path.|
152+
153+
**Function element attributes**
154+
155+
|Attribute|Description|
156+
|---------------|-----------------|
157+
|`Name`|Required. The fully qualified name of the function to treat as external code.|
158+
|`Module`|Optional. The name or full path to the module that contains the function. You can use this attribute to disambiguate functions with the same name.|
159+
|`ExceptionImplementation`|When set to `true`, the call stack displays the function that threw the exception rather than this function.|
160+
161+
### <a name="BKMK_CPP_Customize_stepping_behavior"></a> Customize C++ stepping behavior independent of Just My Code settings
162+
163+
In C++ projects, you can specify functions to step over by listing them as non-user code in *\*.natstepfilter* files. Functions listed in *\*.natstepfilter* files are not dependent on Just My Code settings.
164+
165+
- To specify non-user code for all local Visual Studio users, add the *.natstepfilter* file to the *%VsInstallDirectory%\Common7\Packages\Debugger\Visualizers* folder.
166+
- To specify non-user code for an individual user, add the *.natstepfilter* file to the *%USERPROFILE%\My Documents\Visual Studio 2017\Visualizers* folder.
167+
168+
A *.natstepfilter* file is an XML file with this syntax:
169+
170+
```xml
171+
<?xml version="1.0" encoding="utf-8"?>
172+
<StepFilter xmlns="http://schemas.microsoft.com/vstudio/debugger/natstepfilter/2010">
173+
<Function>
174+
<Name>FunctionSpec</Name>
175+
<Action>StepAction</Action>
176+
</Function>
177+
<Function>
178+
<Name>FunctionSpec</Name>
179+
<Module>ModuleSpec</Module>
180+
<Action>StepAction</Action>
181+
</Function>
182+
</StepFilter>
183+
184+
```
185+
186+
|Element|Description|
187+
|-------------|-----------------|
188+
|`Function`|Required. Specifies one or more functions as non-user functions.|
189+
|`Name`|Required. An ECMA-262 formatted regular expression specifying the full function name to match. For example:<br /><br /> `<Name>MyNS::MyClass.*</Name>`<br /><br /> tells the debugger that all methods in `MyNS::MyClass` are to be considered non-user code. The match is case-sensitive.|
190+
|`Module`|Optional. An ECMA-262 formatted regular expression specifying the full path to the module containing the function. The match is case-insensitive.|
191+
|`Action`|Required. One of these case-sensitive values:<br /><br /> `NoStepInto` - tells the debugger to step over the function.<br /> `StepInto` - tells the debugger to step into the function, overriding any other `NoStepInto` for the matched function.|
192+
193+
## <a name="BKMK_JavaScript_Just_My_Code"></a> JavaScript Just My Code
194+
195+
<a name="BKMK_JS_User_and_non_user_code"></a>
196+
JavaScript Just My Code controls stepping and call stack display by categorizing code in one of these classifications:
197+
198+
|||
199+
|-|-|
200+
|**MyCode**|User code that you own and control.|
201+
|**LibraryCode**|Non-user code from libraries that you use regularly and your app relies on to function correctly (for example WinJS or jQuery).|
202+
|**UnrelatedCode**|Non-user code in your app that you don't own and your app doesn't rely on to function correctly. For example, an advertising SDK that displays ads could be UnrelatedCode. In UWP projects, any code that is loaded into your app from an HTTP or HTTPS URI is also considered UnrelatedCode.|
203+
204+
The JavaScript debugger classifies code as user or non-user in this order:
205+
206+
1. The default classifications.
207+
- Script executed by passing a string to the host-provided `eval` function is **MyCode**.
208+
- Script executed by passing a string to the `Function` constructor is **LibraryCode**.
209+
- Script in a framework reference, such as WinJS or the Azure SDK, is **LibraryCode**.
210+
- Script executed by passing a string to the `setTimeout`, `setImmediate`, or `setInterval` functions is **UnrelatedCode**.
211+
212+
2. Classifications specified for all Visual Studio JavaScript projects in the *%VSInstallDirectory%\JavaScript\JustMyCode\mycode.default.wwa.json* file.
213+
214+
3. Classifications in the *mycode.json* file of the current project.
215+
216+
Each classification step overrides the previous steps.
217+
218+
All other code is classified as **MyCode**.
219+
220+
You can modify the default classifications, and classify specific files and URLs as user or non-user code, by adding a *.json* file named *mycode.json* to the root folder of a JavaScript project. See [Customize JavaScript Just My Code](#BKMK_JS_Customize_Just_My_Code).
221221

222222
<a name="BKMK_JS_Stepping_behavior"></a>
223223
During JavaScript debugging:

docs/ide/default-keyboard-shortcuts-in-visual-studio.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,11 +792,17 @@ The sections in the following table include commands that are global in that you
792792
| Edit.ExpandCurrentRegion | **Ctrl+M, Ctrl+E** |
793793
| Edit.FormatDocument | **Ctrl+K, Ctrl+D** |
794794
| Edit.FormatSelection | **Ctrl+K, Ctrl+F** |
795+
| Edit.GotoAll | **Ctrl+T**<br /><br /> or<br /><br /> **Ctrl+,** |
795796
| Edit.GotoBrace | **Ctrl+]** |
796797
| Edit.GotoBraceExtend | **Ctrl+Shift+]** |
798+
| Edit.GotoRecent | **Ctrl+T,R** |
799+
| Edit.GotoNextIssueinFile | **Alt+PgDn** |
800+
| Edit.GotoPreviousIssueinFile **Alt+PgUp** |
797801
| Edit.HideSelection | **Ctrl+M, Ctrl+H** |
798802
| Edit.IncreaseFilterLevel | **Alt+.** |
799803
| Edit.IncrementalSearch | **Ctrl+I** |
804+
| Edit.InsertCaretsatAllMatching | **Shift+Alt+;** |
805+
| Edit.InsertNextMatchingCaret | **Shift+Alt+.** |
800806
| Edit.InsertTab | **Tab** |
801807
| Edit.LineCut | **Ctrl+L** |
802808
| Edit.LineDelete | **Ctrl+Shift+L** |
@@ -839,7 +845,8 @@ The sections in the following table include commands that are global in that you
839845
| Edit.SelectCurrentWord | **Ctrl+W** |
840846
| Edit.SelectionCancel | **Escape** |
841847
| Edit.SelectToLastGoBack | **Ctrl+=** |
842-
| Edit.ShowCodeLensMenu | **Alt+\`** |
848+
| Edit.ShowCodeLensMenu | **Ctrl+K, Ctrl+\`** |
849+
| Edit.ShowNavigateMenu | **Alt+\`** |
843850
| Edit.StopHidingCurrent | **Ctrl+M, Ctrl+U** |
844851
| Edit.StopOutlining | **Ctrl+M, Ctrl+P** |
845852
| Edit.SwapAnchor | **Ctrl+K, Ctrl+A** |
@@ -1137,4 +1144,4 @@ The sections in the following table include commands that are global in that you
11371144
## See also
11381145

11391146
- [Image Editor for icons](/cpp/windows/image-editor-for-icons)
1140-
- [Using IntelliSense](../ide/using-intellisense.md)
1147+
- [Using IntelliSense](../ide/using-intellisense.md)

0 commit comments

Comments
 (0)