Skip to content

Commit 3508a10

Browse files
authored
Merge pull request #2627 from Microsoft/seanmcm/0_19_1_insiders_merge
Seanmcm/0 19 1 insiders merge
2 parents d1924d6 + c533163 commit 3508a10

36 files changed

+2205
-1139
lines changed

.github/ISSUE_TEMPLATE/language-service.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ about: 'Issues pertaining to IntelliSense, autocomplete, code editing, etc. '
44

55
---
66

7-
Type: LanguageService
8-
**----- Input information below -----**
7+
**Type: LanguageService**
8+
<!----- Input information below ----->
99

10+
<!--
1011
**Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.**
12+
-->
1113

1214
**Describe the bug**
1315
- OS and Version:
@@ -17,19 +19,21 @@ Type: LanguageService
1719
- A clear and concise description of what the bug is.
1820

1921
**To Reproduce**
20-
Steps to reproduce the behavior:
21-
*Provide a code sample including configuration files such as c_cpp_properties.json*
22+
<!-- Steps to reproduce the behavior: -->
23+
<!-- *The most actionable issue reports include a code sample including configuration files such as c_cpp_properties.json* -->
2224
1. Go to '...'
2325
2. Click on '....'
2426
3. Scroll down to '....'
2527
4. See error
2628

2729
**Expected behavior**
28-
A clear and concise description of what you expected to happen.
30+
<!-- A clear and concise description of what you expected to happen. -->
2931

3032
**Screenshots**
31-
If applicable, add screenshots to help explain your problem.
33+
<!-- If applicable, add screenshots to help explain your problem. -->
3234

3335
**Additional context**
36+
<!--
3437
*Call Stacks: For bugs like crashes, deadlocks, infinite loops, etc. that we are not able to repro and for which the call stack may be useful, please attach a debugger and/or create a dmp and provide the call stacks. Starting with 0.17.3, Windows binaries have symbols available in VS Code by setting your "symbolSearchPath" to "http://msdl.microsoft.com/download/symbols".*
3538
Add any other context about the problem here including log messages in your Output window ("C_Cpp.loggingLevel": "Debug" in settings.json).
39+
-->

Documentation/FAQs.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## Table of Contents
44
* Setup: [Debugging Setup](#debugging-setup)
55
* Debugger: [Why is debugging not working?](#why-is-debugging-not-working)
6-
* Build: [How to enable debug symbols?](#how-to-enable-debug-symbols)
6+
* Build: [How to enable debug symbols](#how-to-enable-debug-symbols)
7+
* Logging: [How to enable logging](#how-to-enable-logging)
78

89
## Debugging Setup
910
The debugger needs to be configured to know which executable and debugger to use:
@@ -43,3 +44,39 @@ When in doubt, please check your compiler's documentation for the options necess
4344

4445
* #### cl.exe
4546
Symbols are located in the `*.pdb` file.
47+
48+
## How to enable logging
49+
50+
Enabling logging will show communication information between VS Code and our extension and between our extension and the debugger.
51+
52+
### Logging for `MI` debuggers
53+
54+
The logging block with its defaults is as follows:
55+
56+
```
57+
"logging": {
58+
"trace": false,
59+
"traceResponse": false,
60+
"engineLogging": false
61+
}
62+
```
63+
64+
#### VS Code and the CppTools extension
65+
66+
The logging here is called `trace` logging and can be enabled by setting `trace` and `traceResponse` to `true` in the logging block inside `launch.json`. This will help diagnose issues related to VS Code's communication to our extension and our responses.
67+
68+
#### CppTools extension and the debugger
69+
70+
The logging between CppTools and the debugger is called `engineLogging`. When using an `MI` debugger such as `gdb` or `lldb`, this will show the request, response and events using the `mi` interpreter. This logging will help us determine whether the debugger is receiving the right commands and generating the correct responses.
71+
72+
### Logging for `Visual C++` debugger
73+
74+
The logging block with its defaults is as follows:
75+
76+
```
77+
"logging": {
78+
"engineLogging": false
79+
}
80+
```
81+
82+
The `Visual C++` debugger logging will show only the communication to and from VS Code as all communication to the debugger is done internally to the process and is not visible through logging.

Documentation/LanguageServer/Enabling logging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
If you are experiencing a problem that we are unable to diagnose based on information in your issue report, we might ask you to enable logging and send us your logs.
44

5-
As of version 0.14.0 of the extension, logging information is now delivered directly to the Output window in VSCode. To turn on full logging for an issue report, add `"C_Cpp.loggingLevel": "Information"` to your **settings.json**.
5+
As of version 0.14.0 of the extension, logging information is now delivered directly to the Output window in VSCode. To turn on full logging for an issue report, add `"C_Cpp.loggingLevel": "Information"` or `"C_Cpp.loggingLevel": "Debug"` to your **settings.json**.
66

7-
![image](https://user-images.githubusercontent.com/12818240/31898313-b32ff284-b7cd-11e7-97f5-89df93b5d9de.png)
7+
![image](https://user-images.githubusercontent.com/12818240/44601186-8a2af380-a790-11e8-9094-7064d1ba3cfb.png)
88

99
VS Code organizes the logging from different extensions to improve readability so you must select the "C/C++" option in the log filter selector to see logging from the C/C++ extension:
1010

Documentation/LanguageServer/MinGW.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,17 @@ To use MinGW on Windows, we recommend you add the following configuration to you
44

55
## Extension version 0.17.0 and higher:
66

7-
When you set the `compilerPath` property and change `intelliSenseMode` to `clang-x64`, you no longer need to copy the system include path or defines to `includePath`, `browse.path`, or `defines` to enable IntelliSense to work properly. For example:
7+
When you set the `compilerPath` property and change `intelliSenseMode` to `clang-x64` (or `gcc-x64` in version 0.18.0 and higher), you no longer need to copy the system include path or defines to `includePath`, `browse.path`, or `defines` to enable IntelliSense to work properly. For example:
88

99
```json
1010
{
1111
"name": "MinGW",
12-
"intelliSenseMode": "clang-x64",
12+
"intelliSenseMode": "gcc-x64",
1313
"compilerPath": "C:/mingw64/bin/gcc.exe",
1414
"includePath": [
1515
"${workspaceFolder}"
1616
],
1717
"defines": [],
18-
"browse": {
19-
"path": [
20-
"${workspaceFolder}"
21-
],
22-
"limitSymbolsToIncludedHeaders": true,
23-
"databaseFilename": ""
24-
},
2518
"cStandard": "c11",
2619
"cppStandard": "c++17"
2720
}

Documentation/LanguageServer/Windows Subsystem for Linux.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Windows Subsystem for Linux
22

3-
> **Note:** If you are on **build 17110 of Windows or higher**, you must use version 0.17.0 or higher for IntelliSense to work. The Windows team turned on case-sensitive folders for the WSL environment and the C/C++ extension doesn't support case-sensitive folders until version 0.17.0.
3+
> **Note:** If you are on **build 17110 of Windows or higher**, you must use extension version 0.17.0 or higher for IntelliSense to work. The Windows team turned on case-sensitive folders for the WSL environment and the C/C++ extension doesn't support case-sensitive folders until version 0.17.0.
44
55
To use the Windows Subsystem for Linux with this extension you need to add a configuration to your **c_cpp_properties.json** file which adds the necessary header paths from within the WSL filesystem to the `includePath`.
66

@@ -13,22 +13,12 @@ In **c_cpp_properties.json** you can directly address your WSL compiler and incl
1313
```json
1414
{
1515
"name": "WSL",
16-
"intelliSenseMode": "clang-x64",
16+
"intelliSenseMode": "gcc-x64",
1717
"compilerPath": "/usr/bin/gcc",
1818
"includePath": [
19-
"${workspaceFolder}",
20-
"/mnt/c/libraries/lib1/include",
21-
"C:/libraries/lib2/include"
19+
"${workspaceFolder}/**"
2220
],
2321
"defines": [],
24-
"browse": {
25-
"path": [
26-
"${workspaceFolder}",
27-
"/mnt/c/libraries"
28-
],
29-
"limitSymbolsToIncludedHeaders": true,
30-
"databaseFilename": ""
31-
},
3222
"cStandard": "c11",
3323
"cppStandard": "c++17"
3424
}

Documentation/LanguageServer/c_cpp_properties.json.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
A friendly name for the configuration. "Linux", "Mac", and "Win32" are special names that instruct the extension to load that configuration by default on the associated operating system unless additional configurations have been created. The status bar in VS Code will show you which configuration is active. You can also click on the label in the status bar to change the active configuration.
5454

5555
* #### `intelliSenseMode`
56-
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this property determines which mode the IntelliSense engine will run in. `"msvc-x64"` maps to Visual Studio mode with 64-bit pointer sizes. `"clang-x64"` maps to GCC/CLang mode with 64-bit pointer sizes. Windows uses `"msvc-x64"` by default and Linux/Mac use `"clang-x64"` by default.
56+
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this property determines which mode the IntelliSense engine will run in. `"msvc-x64"` maps to Visual Studio mode with 64-bit pointer sizes. `"clang-x64"` maps to CLang mode with 64-bit pointer sizes. `"gcc-x64"` maps to GCC mode with 64-bit pointer sizes. Windows uses `"msvc-x64"` by default, macOS uses `"clang-x64"` by default, and Linux uses `"gcc-x64"` by default.
5757

5858
* #### `includePath`
5959
If `"C_Cpp.intelliSenseEngine"` is set to "Default" in your settings file, this list of paths will be used by IntelliSense to search for headers included by your source files. This is basically the same as the list of paths you pass to your compiler with the `-I` switch. If a path ends with `/**` the IntelliSense engine will do a recursive search for includes starting from that directory. If on Windows with Visual Studio installed, or if a compiler is specified in the `compilerPath` setting, it is not necessary to list the system include paths in this list.
@@ -68,7 +68,11 @@
6868
A list of files that should be included before any other characters in the source file are processed. Files are included in the order listed.
6969

7070
* #### `compilerPath` (optional)
71-
The absolute path to the compiler you use to build your project. The extension will query the compiler to determine the system include paths and default defines to use for IntelliSense. Args can be added to modify the includes/defines used, e.g. `-nostdinc++`, `-m32`, etc., but paths with spaces must be surrounded by double quotes (`"`) if args are used.
71+
The absolute path to the compiler you use to build your project. The extension will query the compiler to determine the system include paths and default defines to use for IntelliSense.
72+
73+
Args can be added to modify the includes/defines used, e.g. `-nostdinc++`, `-m32`, `-fno-ms-extensions`, etc., but paths with spaces must be surrounded by double quotes (`"`) if args are used.
74+
75+
If you want to disable automatic querying of system include paths and defines, set this value to the emptry string `""`. This is generally not recommended, but there are some cases where automatic querying of system includes and defines is undesirable.
7276

7377
* #### `cStandard`
7478
The C standard revision to use for IntelliSense in your project.
@@ -87,7 +91,7 @@
8791
### Browse properties
8892

8993
* #### `path`
90-
This list of paths will be used by the Tag Parser to search for headers included by your source files. The Tag Parser will automatically search all subfolders in these paths unless the path ends with a `/*` or `\*`. For example, `/usr/include` directs the Tag Parser to search the `include` folder and its subfolders for headers while `/usr/include/*` directs the Tag Parser not to look in any subfolders of `/usr/include`.
94+
This list of paths will be used by the Tag Parser to search for headers included by your source files. If omitted, `includePath` will be used as the `path`. The Tag Parser will automatically search all subfolders in these paths unless the path ends with a `/*` or `\*`. For example, `/usr/include` directs the Tag Parser to search the `include` folder and its subfolders for headers while `/usr/include/*` directs the Tag Parser not to look in any subfolders of `/usr/include`.
9195

9296
* #### `limitSymbolsToIncludedHeaders`
9397
When true, the Tag Parser will only parse code files that have been directly or indirectly included by a source file in `${workspaceFolder}`. When false, the Tag Parser will parse all code files found in the paths specified in the **path** list.

Extension/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ install.lock
1717
*.vsix
1818

1919
# ignore vscode test
20-
.vscode-test/
20+
.vscode-test/
21+
browse*db*

0 commit comments

Comments
 (0)