Skip to content

Commit 5ca003a

Browse files
Merge pull request #10686 from MicrosoftDocs/main638790664270684035sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 4affcd8 + 0e2f402 commit 5ca003a

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed
-6.66 KB
Binary file not shown.

docs/ide/visual-cpp-intellisense-configuration.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ When you open a file that isn't included in a project, Visual Studio provides so
1919

2020
If a file isn't open in single-file mode, and IntelliSense isn't working correctly, the first place to check is the **Error List** window. To see all the IntelliSense errors for the current source file together with all included header files, choose **Build + IntelliSense** in the dropdown:
2121

22-
:::image type="content" source="media/visual-cpp-intellisense-error-list.png" alt-text="Screenshot that shows the IntelliSense Error List window.":::
22+
:::image type="content" source="media/visual-cpp-intellisense-error-list.png" alt-text="Screenshot of the Error List window. Build + IntelliSense is selected in the filter dropdown.":::
2323

2424
IntelliSense produces a maximum of 1,000 errors. If there are more than 1,000 errors in the header files included by a source file, then the source file shows only a single error squiggle at the very start of the source file.
2525

@@ -37,7 +37,7 @@ To see the current values for build macros such as **VC_IncludePath**, select th
3737

3838
For Makefile projects that are based on the NMake project template, choose **NMake** under **Configuration Properties**, and then choose **Include search path** in the **IntelliSense** category:
3939

40-
:::image type="content" source="media/vcpp-intellisense-makefile-include-paths.png" alt-text="Screenshot that shows the Include Search Path setting under Intellisense.":::
40+
:::image type="content" source="media/vcpp-intellisense-makefile-include-paths.png" alt-text="Screenshot that shows the Configuration Properties > N Make > Include Search Path setting.":::
4141

4242
### CMake projects
4343

@@ -53,13 +53,12 @@ For example, it doesn't evaluate preprocessor macros, and therefore it might inc
5353

5454
There are two common ways in which this problem manifests in Visual Studio:
5555

56+
1. The IDE offers to create a function definition for a function that is already defined.
5657
1. If the navigation bar shows an innermost macro, then the current function definition was skipped:
5758

58-
:::image type="content" source="media/vcpp-intellisense-tag-parser-macro.png" alt-text="Screenshot that shows the tag parser skipping the function definition.":::
59-
60-
1. The IDE offers to create a function definition for a function that is already defined:
61-
62-
:::image type="content" source="media/vcpp-intellisense-tag-parser-function.png" alt-text="Screenshot that shows the tag parser offering to define an existing function.":::
59+
:::image type="complex" source="media/vcpp-intellisense-tag-parser-macro.png" alt-text="Screenshot that shows the tag parser skipping the function definition.":::
60+
The code snippet shows a macro definition for do_if that is used inside of the function main. The tag parser doesn't understand the macro, so instead of the navigation dropdown showing that the name of the current function is main, it shows the name of the macro: do_if.
61+
:::image-end:::
6362

6463
To fix these kinds of problems, add a file named *`cpp.hint`* to the root of your solution directory. For more information, see [Hint Files](/cpp/build/reference/hint-files).
6564

@@ -98,7 +97,7 @@ However, in some cases Visual Studio might not update the IntelliSense database
9897

9998
An IntelliSense build doesn't produce binaries, but it can still fail. One possible cause for failure is custom *`.props`* or *`.targets`* files. In Visual Studio 2017 version 15.6 and later, IntelliSense-only build errors are logged to the Output window. To see them, set **Show output from** to **Solution**:
10099

101-
:::image type="content" source="media/visual-cpp-intellisense-output-window.png" alt-text="Screenshot that shows the Output window for solution errors.":::
100+
:::image type="content" source="media/visual-cpp-intellisense-output-window.png" alt-text="Screenshot that shows the Output window. The Show output from dropdown is set to Solution.":::
102101

103102
The error message might instruct you to enable design-time tracing:
104103

0 commit comments

Comments
 (0)