You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Contribution Steps
4
4
5
-
*[Build and debug the extension](Documentation/Getting%20started.md#build-and-debug-the-cpptools-extension).
5
+
*[Build and debug the extension](Documentation/Building%20the%20Extension.md).
6
6
* File an [issue](https://github.com/Microsoft/vscode-cpptools/issues) and a [pull request](https://github.com/Microsoft/vscode-cpptools/pulls) with the change and we will review it.
7
7
* If the change affects functionality, add a line describing the change to [**CHANGELOG.md**](Extension/CHANGELOG.md).
8
8
* Try and add a test in [**test/extension.test.ts**](Extension/test/unitTests/extension.test.ts).
Copy file name to clipboardExpand all lines: Documentation/LanguageServer/MinGW.md
+43-8Lines changed: 43 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,49 @@
1
1
For developers using MinGW on Windows, we recommend you start with the following **c_cpp_properties.json** template. Select "C/Cpp: Edit Configurations" from the command palette to create this file if you haven't already.
2
2
3
-
Note that you may have to change the MinGW version number to match what you have installed. Eg. `C:/MinGW/lib/gcc/mingw32/5.3.0/` instead of `C:/MinGW/lib/gcc/mingw32/6.3.0/`.
3
+
## With extension version 0.16.1 and higher:
4
+
5
+
Starting with version 0.16.1, if 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` and `defines` to enable IntelliSense to work properly. However, `browse.path` still needs to be updated manually to add the system include paths to enable code browsing for system headers. For example:
6
+
7
+
```json
8
+
{
9
+
"configurations": [
10
+
{
11
+
"name": "MinGW",
12
+
"intelliSenseMode": "clang-x64",
13
+
"compilerPath": "C:/MinGW/bin/gcc.exe",
14
+
"includePath": [
15
+
"${workspaceRoot}",
16
+
],
17
+
"defines": [
18
+
"_DEBUG"
19
+
],
20
+
"browse": {
21
+
"path": [
22
+
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
23
+
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
24
+
"C:/MinGW/include/*"
25
+
"${workspaceRoot}",
26
+
],
27
+
"limitSymbolsToIncludedHeaders": true,
28
+
"databaseFilename": ""
29
+
}
30
+
}
31
+
],
32
+
"version": 3
33
+
}
34
+
```
35
+
36
+
Note that the `browse.path` setting is not automatically updated at this time and you may have to change the MinGW version number to match what you have installed. If you are using a different MinGW distribution, the values for `compilerPath` and `browse.path` will likely be different than what is written here.
37
+
38
+
## With extension version 0.16.0 and earlier:
39
+
40
+
In earlier versions of the extension, the `includePath` and a some system defines need to be set in order for IntelliSense to work properly. Note that you may have to change the MinGW version number to match what you have installed. Eg. `C:/MinGW/lib/gcc/mingw32/5.3.0/` instead of `C:/MinGW/lib/gcc/mingw32/6.3.0/`.
4
41
5
42
```json
6
43
{
7
44
"configurations": [
8
45
{
9
-
"name": "Win32",
46
+
"name": "MinGW",
10
47
"intelliSenseMode": "clang-x64",
11
48
"includePath": [
12
49
"${workspaceRoot}",
@@ -19,7 +56,6 @@ Note that you may have to change the MinGW version number to match what you have
19
56
],
20
57
"defines": [
21
58
"_DEBUG",
22
-
"UNICODE",
23
59
"__GNUC__=6",
24
60
"__cdecl=__attribute__((__cdecl__))"
25
61
],
@@ -28,6 +64,7 @@ Note that you may have to change the MinGW version number to match what you have
28
64
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
29
65
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
30
66
"C:/MinGW/include/*"
67
+
"${workspaceRoot}",
31
68
],
32
69
"limitSymbolsToIncludedHeaders": true,
33
70
"databaseFilename": ""
@@ -37,15 +74,15 @@ Note that you may have to change the MinGW version number to match what you have
37
74
}
38
75
```
39
76
40
-
The `includePath` above includes the system header paths that gcc uses in version 6.3.0 for C++ projects and matches the output of `gcc -v -E -x c++ -`. The `intelliSenseMode` should be set to **"clang-x64"** to get MinGW projects to work properly with IntelliSense. The `__GNUC__=#` define should match the major version of the toolchain in your installation (6 in this example).
77
+
The `includePath` above includes the system header paths that gcc uses in version 6.3.0 for C++ projects and matches the output of `"gcc -v -E -x c++ nul"`. The `intelliSenseMode` should be set to **"clang-x64"** to get MinGW projects to work properly with IntelliSense. The `__GNUC__=#` define should match the major version of the toolchain in your installation (6 in this example).
41
78
42
79
For C projects, simply remove the C++ lines:
43
80
44
81
```json
45
82
{
46
83
"configurations": [
47
84
{
48
-
"name": "Win32",
85
+
"name": "MinGW",
49
86
"intelliSenseMode": "clang-x64",
50
87
"includePath": [
51
88
"${workspaceRoot}",
@@ -55,7 +92,6 @@ For C projects, simply remove the C++ lines:
55
92
],
56
93
"defines": [
57
94
"_DEBUG",
58
-
"UNICODE",
59
95
"__GNUC__=6",
60
96
"__cdecl=__attribute__((__cdecl__))"
61
97
],
@@ -64,6 +100,7 @@ For C projects, simply remove the C++ lines:
64
100
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
65
101
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
66
102
"C:/MinGW/include/*"
103
+
"${workspaceRoot}",
67
104
],
68
105
"limitSymbolsToIncludedHeaders": true,
69
106
"databaseFilename": ""
@@ -72,5 +109,3 @@ For C projects, simply remove the C++ lines:
72
109
]
73
110
}
74
111
```
75
-
76
-
With these configurations, you should be all set up to use the new IntelliSense engine for linting, memberlist autocomplete, and quick info (tooltips). Add `"C_Cpp.intelliSenseEngine": "Default"` to your **settings.json** file to try out the new IntelliSense engine.
Copy file name to clipboardExpand all lines: Documentation/LanguageServer/c_cpp_properties.json.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@
78
78
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`.
79
79
80
80
*#### `limitSymbolsToIncludedHeaders`
81
-
When true, the Tag Parser will only parse code files that have been directly or indirectly included by a source file in `${workspaceRoot}`. When false, the Tag Parser will parse all code files found in the paths specified in the **path** list.
81
+
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.
82
82
83
83
*#### `databaseFilename`
84
-
When set, this instructs the extension to save the Tag Parser's symbol database somewhere other than the workspace's default storage location. If a relative path is specified, it will be made relative to the workspace's default storage location, not the workspace folder itself. The `${workspaceRoot}` variable can be used to specify a path relative to the workspace folder (e.g. `$[workspaceRoot}/.vscode/browse.vc.db`)
84
+
When set, this instructs the extension to save the Tag Parser's symbol database somewhere other than the workspace's default storage location. If a relative path is specified, it will be made relative to the workspace's default storage location, not the workspace folder itself. The `${workspaceFolder}` variable can be used to specify a path relative to the workspace folder (e.g. `${workspaceFolder}/.vscode/browse.vc.db`)
* Add support for querying system includes/defines from WSL and Cygwin compilers. [#1845](https://github.com/Microsoft/vscode-cpptools/issues/1845), [#1736](https://github.com/Microsoft/vscode-cpptools/issues/1736)
8
+
* Stop automatically adding `/usr/include` to the `includePath`. [#1819](https://github.com/Microsoft/vscode-cpptools/issues/1819)
9
+
* Fix wrong configuration being used if there are four or more. [#1599](https://github.com/Microsoft/vscode-cpptools/issues/1599)
* Change file not found in `compile_commands.json` message from an error to a warning. [#1783](https://github.com/Microsoft/vscode-cpptools/issues/1783)
12
+
* Fix an IntelliSense crash during completion requests. [#1782](https://github.com/Microsoft/vscode-cpptools/issues/1782)
13
+
* Update the installed clang-format to 6.0.
14
+
15
+
## Version 0.16.1: March 30, 2018
16
+
* Fix random deadlock caused by logging code on Linux/Mac. [#1759](https://github.com/Microsoft/vscode-cpptools/issues/1759)
17
+
* Fix compiler from `compileCommands` not being queried for includes/defines if `compilerPath` isn't set on Windows. [#1754](https://github.com/Microsoft/vscode-cpptools/issues/1754)
Copy file name to clipboardExpand all lines: Extension/c_cpp_properties.schema.json
+13-7Lines changed: 13 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
],
12
12
"properties": {
13
13
"name": {
14
-
"description": "Configuration identifier. Mac, Linux, or Win32 are special identifiers for configurations that will be auto-selected on those platforms, but the identifier can be anything.",
14
+
"description": "Configuration identifier. Mac, Linux, and Win32 are special identifiers for configurations that will be auto-selected on those platforms, but the identifier can be anything.",
15
15
"type": "string"
16
16
},
17
17
"compilerPath": {
@@ -24,7 +24,8 @@
24
24
"enum": [
25
25
"c89",
26
26
"c99",
27
-
"c11"
27
+
"c11",
28
+
"${default}"
28
29
]
29
30
},
30
31
"cppStandard": {
@@ -35,7 +36,8 @@
35
36
"c++03",
36
37
"c++11",
37
38
"c++14",
38
-
"c++17"
39
+
"c++17",
40
+
"${default}"
39
41
]
40
42
},
41
43
"compileCommands": {
@@ -64,12 +66,13 @@
64
66
}
65
67
},
66
68
"intelliSenseMode": {
69
+
"description": "If set, it overrides the default mode used by the IntelliSense engine. Windows defaults to msvc-x64 and Linux/Mac default to clang-x64.",
67
70
"type": "string",
68
71
"enum": [
69
72
"msvc-x64",
70
-
"clang-x64"
71
-
],
72
-
"description": "If set, it overrides the default mode used by the IntelliSense engine. Windows defaults to msvc-x64 and Linux/Mac default to clang-x64."
73
+
"clang-x64",
74
+
"${default}"
75
+
]
73
76
},
74
77
"forcedInclude": {
75
78
"description": "A list of files that should be included before any include file in a translation unit.",
@@ -83,7 +86,10 @@
83
86
"properties": {
84
87
"limitSymbolsToIncludedHeaders": {
85
88
"description": "true to process only those files directly or indirectly included as headers, false to process all files under the specified include paths.",
86
-
"type": "boolean"
89
+
"type": [
90
+
"boolean",
91
+
"string"
92
+
]
87
93
},
88
94
"databaseFilename": {
89
95
"description": "Path to the generated symbol database. If a relative path is specified, it will be made relative to the workspace's default storage location.",
console.log('Please make sure to not check in package.json that has been rewritten by the extension activation. If you intended to have changes in package.json, please only check-in your changes. If you did not, please run `git checkout -- package.json`.');
0 commit comments