Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da277c8593 | ||
|
|
b3cce807bb | ||
|
|
a533eb9a43 | ||
|
|
9702eae953 | ||
|
|
a4b51997ff | ||
|
|
ec9270f5a9 | ||
|
|
75f35a1fd7 | ||
|
|
dcc0174133 | ||
|
|
3b8c3143e4 | ||
|
|
33e7d70324 | ||
|
|
703e23a62b | ||
|
|
39ba7fc6ba | ||
|
|
6488a11dc3 | ||
|
|
5ca48e24cf | ||
|
|
de9cc715fc | ||
|
|
c727ceca1b | ||
|
|
f58af4fb2e | ||
|
|
7935b97329 | ||
|
|
bd6f8f0df3 | ||
|
|
4b22333f5c | ||
|
|
968e0d2aae | ||
|
|
8dc8b3bc37 | ||
|
|
bb962b91e8 | ||
|
|
8c53c027ca | ||
|
|
b864126494 | ||
|
|
b78e85619a | ||
|
|
f474ba8539 | ||
|
|
0f1071a5c9 | ||
|
|
f69e6e191b | ||
|
|
230895d6ba | ||
|
|
fa8173076d | ||
|
|
3079fb58ae | ||
|
|
9f1b482de4 | ||
|
|
8f6714254a | ||
|
|
5246cdc527 | ||
|
|
4938f5b2f4 | ||
|
|
21fef3b067 | ||
|
|
71582d1883 | ||
|
|
23fc338f71 | ||
|
|
4a8b143ce0 | ||
|
|
b1274d3c76 | ||
|
|
8f8565dbfd | ||
|
|
7f4614c31c | ||
|
|
eccee49017 | ||
|
|
e231453778 | ||
|
|
8729804dc2 | ||
|
|
c607604b6b | ||
|
|
460b95920f | ||
|
|
1c38b55b9f | ||
|
|
0cf237c839 | ||
|
|
e12bad5172 | ||
|
|
04bb260577 | ||
|
|
ddc1f901c2 | ||
|
|
9ca27af2df | ||
|
|
b964d4ebc4 | ||
|
|
082435ec8b | ||
|
|
324c5f59f4 | ||
|
|
72581c23b7 | ||
|
|
807ff80f56 | ||
|
|
b0e17a1fd9 | ||
|
|
bc64d25a1d | ||
|
|
ed5d8c8fac | ||
|
|
3a9f4c404d | ||
|
|
4330679e23 | ||
|
|
88e9724892 | ||
|
|
acf7b464eb | ||
|
|
78f5a38110 | ||
|
|
31eed4cee2 | ||
|
|
ea8ab1358f | ||
|
|
55558a53e3 | ||
|
|
536685c8a0 | ||
|
|
b6f184744c | ||
|
|
539ecc536f | ||
|
|
e819f36e91 | ||
|
|
140670c371 | ||
|
|
102ffc1616 | ||
|
|
28981f3ce6 | ||
|
|
775aba8650 | ||
|
|
b3fb2558fd | ||
|
|
80716ae228 | ||
|
|
6d71c6dd4f | ||
|
|
da68908e3e |
+3
-1
@@ -35,7 +35,9 @@ script:
|
||||
- npm run tslint
|
||||
# pr-check needs to run before test. test modifies package.json.
|
||||
- npm run pr-check
|
||||
- npm run test
|
||||
- npm run unitTests
|
||||
# TODO: Merge tests into one group due to Gulp 4.0
|
||||
- npm run integrationTests
|
||||
# Dump integrationTest.log output
|
||||
- find ~ -name "integrationTests.log" -type f -exec cat {} \;
|
||||
|
||||
Vendored
+2
-2
@@ -4,7 +4,7 @@
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "build",
|
||||
"label": "build",
|
||||
"type": "shell",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
@@ -47,4 +47,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,13 @@ You can open the solution file **MIDebugEngine.sln** located under **src** and c
|
||||
* Microsoft.MIDebugEngine.dll
|
||||
* vscode\OpenDebugAD7.exe
|
||||
* vscode\Microsoft.DebugEngineHost.dll
|
||||
* vscode\Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.dll
|
||||
|
||||
The symbol files are as follows:
|
||||
|
||||
**On Windows**
|
||||
* Microsoft.MICore.pdb
|
||||
* Microsoft.MIDebugEngine.dll
|
||||
* Microsoft.MIDebugEngine.pdb
|
||||
* vscode\OpenDebugAD7.pdb
|
||||
* vscode\Microsoft.DebugEngineHost.pdb
|
||||
|
||||
@@ -51,11 +52,13 @@ This will cause the debugger to look like it has hung once you start debugging,
|
||||
|
||||
### Debugging MIEngine running on Linux or Mac OS X
|
||||
|
||||
#### With MonoDevelop
|
||||
|
||||
On Linux and Mac OS X, we use `mono` as our framework. You can download Xamarin Studio v5.10.1.6 and remotely attach to your Mac or Linux box to debug there.
|
||||
|
||||
#### Install Prerequisites
|
||||
1. Install [GTK](http://www.mono-project.com/download/)
|
||||
2. Install [Xamarin Studio v5.10.1.6](http://download.xamarin.com/studio/Windows/XamarinStudio-5.10.1.6-0.msi)
|
||||
##### Install Prerequisites
|
||||
1. Install [GTK](http://www.mono-project.com/download/).
|
||||
2. Install [Xamarin Studio v5.10.1.6](http://download.xamarin.com/studio/Windows/XamarinStudio-5.10.1.6-0.msi).
|
||||
|
||||
Remote attach functionality behind a flag. You can run it like this:
|
||||
```PowerShell
|
||||
@@ -64,26 +67,60 @@ set MONODEVELOP_SDB_TEST=1
|
||||
MonoDevelop.exe
|
||||
```
|
||||
|
||||
#### Create an empty project for attaching (one-time setup)
|
||||
##### Create an empty project for attaching (one-time setup)
|
||||
|
||||
1. Launch MonoDevelop
|
||||
2. File -> New Solution
|
||||
3. Misc/Generic Project
|
||||
4. Name project and hit "Create"
|
||||
5. Right-click the project node (blue square) and do "Options"
|
||||
1. Launch MonoDevelop.
|
||||
2. File -> New Solution.
|
||||
3. Misc/Generic Project.
|
||||
4. Name project and hit "Create".
|
||||
5. Right-click the project node (blue square) and do "Options".
|
||||
6. Under Run -> Custom Commands, select "Execute" in the lower dropdown and choose a command (I use `c:\windows\notepad.exe` - it doesn't matter what the command is, but MonoDevelop requires it to exist before it'll light up the Run menu).
|
||||
|
||||
#### Configure the extension to enable remote debugging
|
||||
##### Configure the extension to enable remote debugging
|
||||
|
||||
Open the **~/.vscode/extensions/ms-vscode.cpptools-\<version\>/debugAdapters/OpenDebugAD7** file with a text editor and locate and uncomment the line at the bottom. When you start debugging, it will now hang until the remote debugger is attached from Xamarin Studio.
|
||||
|
||||
#### Attach the remote debugger
|
||||
##### Attach the remote debugger
|
||||
|
||||
In MonoDevelop: Run -> Run With -> Custom Command Mono Soft Debugger
|
||||
Fill in the IP and port of the Linux/Mac OS X machine and hit "Connect" to start debugging
|
||||
In MonoDevelop: Run -> Run With -> Custom Command Mono Soft Debugger.
|
||||
Fill in the IP and port of the Linux/Mac OS X machine and hit "Connect" to start debugging.
|
||||
|
||||
After you've done this once, you can hit the MonoDevelop "Play" button or <kbd>F5</kbd> to bring up the connect dialog again.
|
||||
|
||||
Note: If you are debugging to CentOS, you will need to make an exception in the firewall
|
||||
#### With VS Code + Mono Debug
|
||||
|
||||
##### Install Prerequisites
|
||||
1. Install [VS Code](https://code.visualstudio.com/Download).
|
||||
2. Install Mono Debug extension for VS Code.
|
||||
|
||||
##### Create an empty project (one-time setup)
|
||||
1. Open to a new folder and create `.vscode/launch.json`.
|
||||
2. Create the following configuration in launch.json.
|
||||
```
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Attach to Mono",
|
||||
"request": "attach",
|
||||
"type": "mono",
|
||||
"address": "<INSERT_MACHINE_IP_ADDRESS_HERE>",
|
||||
"port": 1234
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
##### Configure the extension to enable remote debugging
|
||||
|
||||
Open the **~/.vscode/extensions/ms-vscode.cpptools-\<version\>/debugAdapters/OpenDebugAD7** file with a text editor and locate and uncomment the line at the bottom. When you start debugging, it will now hang until the remote debugger is attached from VS Code.
|
||||
|
||||
##### Attach the remote debugger
|
||||
|
||||
Select the `Attach to Mono` configuration and hit F5.
|
||||
|
||||
#### Additional Notes
|
||||
|
||||
Note: If you are debugging to CentOS, you will need to make an exception in the firewall.
|
||||
* `sudo firewall-cmd --zone=public --add-port=1234/tcp --permanent`
|
||||
* `sudo firewall-cmd --reload`
|
||||
|
||||
@@ -23,7 +23,7 @@ When you start debugging, if it is showing that your breakpoints aren't bound (s
|
||||
|
||||
### Debugging starts but all the lines in my stack trace are grey
|
||||
|
||||
If your debugger is showing a grey stacktrace or won't stop at a breakpoint,or the symbols in the call stack are grey then your executable was compiled without [debug symbols](#how-to-enable-debug-symbols).
|
||||
If your debugger is showing a grey stacktrace or won't stop at a breakpoint, or the symbols in the call stack are grey then your executable was compiled without [debug symbols](#how-to-enable-debug-symbols).
|
||||
|
||||
## How to enable debug symbols?
|
||||
|
||||
|
||||
@@ -20,6 +20,12 @@ When you set the `compilerPath` property and change `intelliSenseMode` to `clang
|
||||
}
|
||||
```
|
||||
|
||||
Replace "gcc.exe" with whatever compiler you're using, e.g. "g++.exe", "clang-5.0.exe", etc. -- just make sure the file is a valid Windows executable (not a 0 size symlink).
|
||||
|
||||
For Cygwin, set the `compilerPath` to the appropriate Cygwin path, e.g. "C:/cygwin64/bin/g++.exe".
|
||||
|
||||
If it seems like the `compilerPath` is not getting used, you can debug the issue via [enabling logging](Enabling%20logging.md).
|
||||
|
||||
## Extension version 0.16.1 and earlier:
|
||||
|
||||
If you have an older version of the C/C++ extension installed, use [these instructions](Archive/MinGW.md) instead.
|
||||
|
||||
@@ -68,7 +68,11 @@
|
||||
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.
|
||||
|
||||
* #### `compilerPath` (optional)
|
||||
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.
|
||||
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`, `-fno-ms-extensions`, etc., but paths with spaces must be surrounded by double quotes (`"`) if args are used.
|
||||
|
||||
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.
|
||||
|
||||
* #### `cStandard`
|
||||
The C standard revision to use for IntelliSense in your project.
|
||||
|
||||
Vendored
+2
-2
@@ -15,7 +15,7 @@
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/**/*.js"
|
||||
],
|
||||
"preLaunchTask": "compile",
|
||||
"preLaunchTask": "TypeScript Compile",
|
||||
},
|
||||
{
|
||||
"name": "Launch Tests",
|
||||
@@ -31,7 +31,7 @@
|
||||
"outFiles": [
|
||||
"${workspaceFolder}/out/test/**/*.js"
|
||||
],
|
||||
"preLaunchTask": "compile"
|
||||
"preLaunchTask": "TypeScript Compile"
|
||||
},
|
||||
{
|
||||
"name": "Node Attach",
|
||||
|
||||
Vendored
+1
-3
@@ -5,7 +5,6 @@
|
||||
"tasks": [
|
||||
{
|
||||
"label": "TypeScript Compile",
|
||||
"identifier": "compile",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
@@ -29,7 +28,6 @@
|
||||
},
|
||||
{
|
||||
"label": "TypeScript Lint",
|
||||
"identifier": "tslint",
|
||||
"group": "build",
|
||||
"isBackground": false,
|
||||
"type": "shell",
|
||||
@@ -53,7 +51,7 @@
|
||||
]
|
||||
},
|
||||
"dependsOn": [
|
||||
"compile"
|
||||
"TypeScript Compile"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
+97
-19
@@ -1,5 +1,82 @@
|
||||
# C/C++ for Visual Studio Code Change Log
|
||||
|
||||
## Version 0.21.0 January 23, 2019
|
||||
### New Features
|
||||
* Add documentation comments for hover, completion, and signature help. [#399](https://github.com/Microsoft/vscode-cpptools/issues/399)
|
||||
* Add completion committing for methods after `(`. [#1184](https://github.com/Microsoft/vscode-cpptools/issues/1184)
|
||||
* Add macro expansions to hover. [#1734](https://github.com/Microsoft/vscode-cpptools/issues/1734)
|
||||
* Add support for `__int128_t` and `__uint128_t` types. [#1815](https://github.com/Microsoft/vscode-cpptools/issues/1815)
|
||||
* Add Italian translations for command titles.
|
||||
* Julien Russo (@Dotpys) [PR #2663](https://github.com/Microsoft/vscode-cpptools/pull/2663)
|
||||
* Add icons for operators, structs/unions, enum values, template arguments, and macros. [#2849](https://github.com/Microsoft/vscode-cpptools/issues/2849)
|
||||
* Change `#include` completion to show individual folders instead of the entire paths, fixing previous performance problems. [#2836](https://github.com/Microsoft/vscode-cpptools/issues/2836)
|
||||
* Add text `(declaration)`, `(typedef)`, `(type alias)`, and `(union)` to symbols. [#2851](https://github.com/Microsoft/vscode-cpptools/issues/2851)
|
||||
* Add a refresh button to the `Attach to Process` picker. [#2885](https://github.com/Microsoft/vscode-cpptools/issues/2885)
|
||||
* Matt Bise (@mbise1993) [PR #2895](https://github.com/Microsoft/vscode-cpptools/pull/2895)
|
||||
* Add completion committing for templates after `<`. [#2953](https://github.com/Microsoft/vscode-cpptools/issues/2953)
|
||||
|
||||
### Bug Fixes
|
||||
* Add the Microsoft digital signature to Windows binaries to avoid getting incorrectly flagged by virus scanners. [#1103](https://github.com/Microsoft/vscode-cpptools/issues/1103), [#2970](https://github.com/Microsoft/vscode-cpptools/issues/2970)
|
||||
* Fix bugs when UTF-8 characters > 1 byte are used. [#1504](https://github.com/Microsoft/vscode-cpptools/issues/1504), [#1525](https://github.com/Microsoft/vscode-cpptools/issues/1525), [#2034](https://github.com/Microsoft/vscode-cpptools/issues/2034), [#2082](https://github.com/Microsoft/vscode-cpptools/issues/2082), [#2883](https://github.com/Microsoft/vscode-cpptools/issues/2883)
|
||||
* Fix some IntelliSense process crashes. [#1785](https://github.com/Microsoft/vscode-cpptools/issues/1785), [#2913](https://github.com/Microsoft/vscode-cpptools/issues/2913)
|
||||
* Fix several incorrect IntelliSense error squiggles. [#1942](https://github.com/Microsoft/vscode-cpptools/issues/1942), [#2422](https://github.com/Microsoft/vscode-cpptools/issues/2422), [#2474](https://github.com/Microsoft/vscode-cpptools/issues/2474), [#2478](https://github.com/Microsoft/vscode-cpptools/issues/2478), [#2597](https://github.com/Microsoft/vscode-cpptools/issues/2597), [#2763](https://github.com/Microsoft/vscode-cpptools/issues/2763)
|
||||
* Fix some main process crashes. [#2505](https://github.com/Microsoft/vscode-cpptools/issues/2505), [#2768](https://github.com/Microsoft/vscode-cpptools/issues/2768)
|
||||
* Fix incorrect IntelliSense error with Mac clang 10.0 libraries. [#2608](https://github.com/Microsoft/vscode-cpptools/issues/2608)
|
||||
* Fix completion not working in template specializations. [#2620](https://github.com/Microsoft/vscode-cpptools/issues/2620)
|
||||
* Fix incorrect completions after Enter is used after struct, class, etc. [#2734](https://github.com/Microsoft/vscode-cpptools/issues/2734)
|
||||
* Fix memory "leak" when parsing a large workspace. [#2737](https://github.com/Microsoft/vscode-cpptools/issues/2737)
|
||||
* Fix IntelliSense-based `Go to Definition` with overloads that return a template with a default param (e.g. vector) [#2736](https://github.com/Microsoft/vscode-cpptools/issues/2736)
|
||||
* Fix `Go to Definition` when `__catch()`, `_NO_EXCEPT_DEBUG`, or `_LIBCPP_BEGIN_NAMESPACE_STD` is used. [#2761](https://github.com/Microsoft/vscode-cpptools/issues/2761), [#2766](https://github.com/Microsoft/vscode-cpptools/issues/2766)
|
||||
* Fix `Go to Definition` when `method(void)` is used. [#2802](https://github.com/Microsoft/vscode-cpptools/issues/2802)
|
||||
* Fix error `"TypeError: Cannot read property 'map' of undefined at asCompletionResult"`. [#2807](https://github.com/Microsoft/vscode-cpptools/issues/2807)
|
||||
* Fix quotes around defines not supported for custom configuration providers. [#2820](https://github.com/Microsoft/vscode-cpptools/issues/2820)
|
||||
* Fix PowerShell bug on Win7. [#2822](https://github.com/Microsoft/vscode-cpptools/issues/2822)
|
||||
* Fix Tag Parser completion details missing keywords (i.e. `using`, `class`, `#define`, etc.). [#2850](https://github.com/Microsoft/vscode-cpptools/issues/2850)
|
||||
* Fix problem with empty recursive include paths. [#2855](https://github.com/Microsoft/vscode-cpptools/issues/2855)
|
||||
* Fix `NullReferenceException` on debugger launch with VS Code Insiders. [#2858](https://github.com/Microsoft/vscode-cpptools/issues/2858), [PR Microsoft/MIEngine#810](https://github.com/Microsoft/MIEngine/pull/810)
|
||||
* Fix IntelliSense errors with template argument deduction. [#2907](https://github.com/Microsoft/vscode-cpptools/issues/2907), [#2912](https://github.com/Microsoft/vscode-cpptools/issues/2912)
|
||||
* Retry Insider VSIX downloading with `http.proxySupport` `"off"`. [#2927](https://github.com/Microsoft/vscode-cpptools/issues/2927)
|
||||
* Fix snippet completions being offered when they shouldn't be. [#2942](https://github.com/Microsoft/vscode-cpptools/issues/2942)
|
||||
* Set the `editor.wordBasedSuggestions` to `false` by default to prevent incorrect completions. [#2943](https://github.com/Microsoft/vscode-cpptools/issues/2943)
|
||||
* Fix IntelliSense-based `Go to Definition` for functions with function pointer parameters. [#2981](https://github.com/Microsoft/vscode-cpptools/issues/2981)
|
||||
* Fix `<` incorrectly triggering completions. [#2985](https://github.com/Microsoft/vscode-cpptools/issues/2985)
|
||||
* Fix recursive includes not adding paths used by `forcedInclude` files. [#2986](https://github.com/Microsoft/vscode-cpptools/issues/2986)
|
||||
* Fix crash when `//` is used in a recursive `includePath`. [#2987](https://github.com/Microsoft/vscode-cpptools/issues/2987)
|
||||
* Fix compiler in `compile_commands.json` not taking precedence over the `Cpp.default.compilerPath`. [#2793](https://github.com/Microsoft/vscode-cpptools/issues/2793)
|
||||
* Fix `#include` completion not working for symlinks. [#2843](https://github.com/Microsoft/vscode-cpptools/issues/2843)
|
||||
* Fix IntelliSense-based `Go to Definition` for `const` methods. [#3014](https://github.com/Microsoft/vscode-cpptools/issues/3014)
|
||||
* Support `C_Cpp.updateChannel` for VS Code Exploration builds.
|
||||
|
||||
## Version 0.20.1: October 31, 2018
|
||||
* Fix IntelliSense-based `Go to Declaration` when there's only a definition in a TU. [#2743](https://github.com/Microsoft/vscode-cpptools/issues/2743)
|
||||
* Fix `#include` completion for standalone header files. [#2744](https://github.com/Microsoft/vscode-cpptools/issues/2744)
|
||||
* Fix the highest hitting main process crash.
|
||||
* Fix IntelliSense process crash with completion.
|
||||
|
||||
## Version 0.20.0: October 30, 2018
|
||||
* Add IntegratedTerminal support for Linux and Windows. [#35](https://github.com/microsoft/vscode-cpptools/issues/35)
|
||||
* Unify Visual Studio Code debug protocol parsing by using a shared library with Visual Studio.
|
||||
* Fix IntelliSense-based `Go to Definition` on overloads (in the same TU). [#1071](https://github.com/Microsoft/vscode-cpptools/issues/1071)
|
||||
* Fix inactive regions not being disabled when falling back to the Tag Parser. [#2181](https://github.com/Microsoft/vscode-cpptools/issues/2181)
|
||||
* Fix `#include` completion not working with `compile_commands.json` or custom configuration providers. [#2242](https://github.com/Microsoft/vscode-cpptools/issues/2242)
|
||||
* Fix IntelliSense failing if recursive includes removes all paths. [#2442](https://github.com/Microsoft/vscode-cpptools/issues/2442)
|
||||
* Fix incorrect IntelliSense errors with MinGW (stop using `-fms-extensions` by default). [#2443](https://github.com/Microsoft/vscode-cpptools/issues/2443), [#2623](https://github.com/Microsoft/vscode-cpptools/issues/2623)
|
||||
* Fix error squiggles sometimes not updating after typing. [#2448](https://github.com/Microsoft/vscode-cpptools/issues/2448)
|
||||
* Add support for Mac framework paths in `compile_commands.json`. [#2508](https://github.com/Microsoft/vscode-cpptools/issues/2508)
|
||||
* Fix IntelliSense-based `Go to Definition` falling back to the Tag Parser for definitions not in the TU. [#2536](https://github.com/Microsoft/vscode-cpptools/issues/2536), [#2677](https://github.com/Microsoft/vscode-cpptools/issues/2677)
|
||||
* Fix IntelliSense-based `Go to Definition` on the identifier of a definition with no declaration. [#2573](https://github.com/Microsoft/vscode-cpptools/issues/2573)
|
||||
* Fix IntelliSense-based `Go to Definition` not falling back to the declaration (in certain cases). [#2574](https://github.com/Microsoft/vscode-cpptools/issues/2574)
|
||||
* Fix IntelliSense-based `Go to Definition` going to the wrong location after edits are made. [#2579](https://github.com/Microsoft/vscode-cpptools/issues/2579)
|
||||
* Fix `Go to Definition` when the `intelliSenseEngineFallback` is `Disabled` and `#include`s are missing. [#2583](https://github.com/Microsoft/vscode-cpptools/issues/2583)
|
||||
* Fix empty `C_Cpp.default.*` settings not being used. [#2584](https://github.com/Microsoft/vscode-cpptools/issues/2584)
|
||||
* Fix quoting around `ssh`'s command (for the debugger). [#2585](https://github.com/Microsoft/vscode-cpptools/issues/2585)
|
||||
* Fix crash on hover (and `Go to Definition`) when using the `Tag Parser`. [#2586](https://github.com/Microsoft/vscode-cpptools/issues/2586)
|
||||
* Fix errors when a workspace folder isn't open. [#2613](https://github.com/Microsoft/vscode-cpptools/issues/2613), [#2691](https://github.com/Microsoft/vscode-cpptools/issues/2691)
|
||||
* Fix `-isystem` without a space after getting ignored in `compile_comamands.json`. [#2629](https://github.com/Microsoft/vscode-cpptools/issues/2629)
|
||||
* Fix Insiders update channel installation bugs. [#2636](https://github.com/Microsoft/vscode-cpptools/issues/2636), [#2685](https://github.com/Microsoft/vscode-cpptools/issues/2685)
|
||||
* Fix IntelliSense-based `Go to Declaration` falling back to the Tag Parser if the definition is also in the TU. [#2642](https://github.com/Microsoft/vscode-cpptools/issues/2642)
|
||||
* Fix the `Disabled` `intelliSenseEngine` setting not working with custom configuration providers. [#2656](https://github.com/Microsoft/vscode-cpptools/issues/2656)
|
||||
|
||||
## Version 0.19.0: September 27, 2018
|
||||
* Change the symbol database to update without needing to save. [#202](https://github.com/Microsoft/vscode-cpptools/issues/202)
|
||||
* Enable IntelliSense-based `Go to Definition` for the current translation unit, including local variables and overloaded operators. [#255](https://github.com/Microsoft/vscode-cpptools/issues/255), [#979](https://github.com/Microsoft/vscode-cpptools/issues/979)
|
||||
@@ -15,7 +92,7 @@
|
||||
* Gabriel Arjones (@g-arjones) [PR #2495](https://github.com/Microsoft/vscode-cpptools/pull/2495), [PR #2503](https://github.com/Microsoft/vscode-cpptools/pull/2503)
|
||||
* Fix bug with variable resolution. [#2532](https://github.com/Microsoft/vscode-cpptools/issues/2532)
|
||||
* Fix off-by-one bug with hover and `Go to Definition`. [#2535](https://github.com/Microsoft/vscode-cpptools/issues/2535)
|
||||
* Fix for [Microsoft/vscode#54213](https://github.com/Microsoft/vscode/issues/54213)
|
||||
* Fix [Microsoft/vscode#54213](https://github.com/Microsoft/vscode/issues/54213)
|
||||
|
||||
## Version 0.18.1: August 17, 2018
|
||||
* Fix 0.18.0 regression causing non-MinGW compilers to use `-fms-extensions` on Windows. [#2424](https://github.com/Microsoft/vscode-cpptools/issues/2424), [#2425](https://github.com/Microsoft/vscode-cpptools/issues/2425)
|
||||
@@ -49,7 +126,7 @@
|
||||
* Fix IntelliSense crash when the gcc-8 type_traits header is used. [#2323](https://github.com/Microsoft/vscode-cpptools/issues/2323), [#2328](https://github.com/Microsoft/vscode-cpptools/issues/2328)
|
||||
* Limit configuration popups to one at a time. [#2324](https://github.com/Microsoft/vscode-cpptools/issues/2324)
|
||||
* Don't show `includePath` code actions if compile commands or custom configuration providers are used. [#2334](https://github.com/Microsoft/vscode-cpptools/issues/2334)
|
||||
* Fix `Cpp.clang_format_path` not accepting environment variables. [#2344](https://github.com/Microsoft/vscode-cpptools/issues/2344)
|
||||
* Fix `C_Cpp.clang_format_path` not accepting environment variables. [#2344](https://github.com/Microsoft/vscode-cpptools/issues/2344)
|
||||
* Fix IntelliSense not working with non-ASCII characters in the WSL install path. [#2351](https://github.com/Microsoft/vscode-cpptools/issues/2351)
|
||||
* Filter out buggy IntelliSense error `"= delete" can only appear on the first declaration of a function`. [#2352](https://github.com/Microsoft/vscode-cpptools/issues/2352)
|
||||
* Fix IntelliSense failing with WSL if gcc is installed bug g++ isn't. [#2360](https://github.com/Microsoft/vscode-cpptools/issues/2360)
|
||||
@@ -79,10 +156,11 @@
|
||||
* Fix variables not resolving in `macFrameworkPath`. [#2234](https://github.com/Microsoft/vscode-cpptools/issues/2234)
|
||||
* Fix `Go to Definition` not working for macros followed by `.` or `->`. [#2245](https://github.com/Microsoft/vscode-cpptools/issues/2245)
|
||||
* Fix `#include` autocomplete with Mac framework headers. [#2251](https://github.com/Microsoft/vscode-cpptools/issues/2251)
|
||||
* Fix for debugging to support empty arguments for debuggee. [#2258](https://github.com/Microsoft/vscode-cpptools/issues/2258)
|
||||
* Fix debugging to support empty arguments for debuggee. [#2258](https://github.com/Microsoft/vscode-cpptools/issues/2258)
|
||||
* Fix `Go to Definition` bug (missing symbols outside the workspace). [#2281](https://github.com/Microsoft/vscode-cpptools/issues/2281)
|
||||
* Fix incorrect hover in enum definitions. [#2286](https://github.com/Microsoft/vscode-cpptools/issues/2286)
|
||||
* Add a setting to silence configuration provider warnings. [#2292](https://github.com/Microsoft/vscode-cpptools/issues/2292)
|
||||
* Fix for debugging async Visual C++ causing debugger to hang.
|
||||
* Fix debugging async Visual C++ causing debugger to hang.
|
||||
* Fix `main` snippet.
|
||||
|
||||
## Version 0.17.6: July 2, 2018
|
||||
@@ -117,9 +195,9 @@
|
||||
* On Windows, `compilerPath` now populates with the guessed `cl.exe` path, and the `MSVC` include path is based on the `cl.exe` path.
|
||||
* Fix files under a non-recursive `browse.path` being removed from the database.
|
||||
* Fix `*` not working in `browse.path` with WSL.
|
||||
* Fix for -break-insert main returning multiple bind points. [#729](https://github.com/Microsoft/MIEngine/pull/729)
|
||||
* Use -- instead of -x for gnome-terminal. [#733](https://github.com/Microsoft/MIEngine/pull/733)
|
||||
* Added `miDebuggerArgs` in order to pass arguments to the program in `miDebuggerPath`. [#720](https://github.com/Microsoft/MIEngine/pull/720)
|
||||
* Fix -break-insert main returning multiple bind points. [PR Microsoft/MIEngine#729](https://github.com/Microsoft/MIEngine/pull/729)
|
||||
* Use -- instead of -x for gnome-terminal. [PR Microsoft/MIEngine#733](https://github.com/Microsoft/MIEngine/pull/733)
|
||||
* Added `miDebuggerArgs` in order to pass arguments to the program in `miDebuggerPath`. [PR Microsoft/MIEngine#720](https://github.com/Microsoft/MIEngine/pull/720)
|
||||
|
||||
## Version 0.17.4: May 31, 2018
|
||||
* Fix infinite loop (caused by deadlock) when using recursive includes. [#2043](https://github.com/Microsoft/vscode-cpptools/issues/2043)
|
||||
@@ -224,9 +302,9 @@
|
||||
* Add `C_Cpp.exclusionPolicy` default to `checkFolders` to avoid expensive `files.exclude` checking on every file.
|
||||
|
||||
## Version 0.14.5: December 18, 2017
|
||||
* Fix for stackwalk `NullReferenceException`. [#1339](https://github.com/Microsoft/vscode-cpptools/issues/1339)
|
||||
* Fix for `-isystem` (or `-I`) not being used in `compile_commands.json` if there's a space after it. [#1343](https://github.com/Microsoft/vscode-cpptools/issues/1343)
|
||||
* Fix for header switching from `.cc` to `.hpp` files (and other cases). [#1341](https://github.com/Microsoft/vscode-cpptools/issues/1341)
|
||||
* Fix stackwalk `NullReferenceException`. [#1339](https://github.com/Microsoft/vscode-cpptools/issues/1339)
|
||||
* Fix `-isystem` (or `-I`) not being used in `compile_commands.json` if there's a space after it. [#1343](https://github.com/Microsoft/vscode-cpptools/issues/1343)
|
||||
* Fix header switching from `.cc` to `.hpp` files (and other cases). [#1341](https://github.com/Microsoft/vscode-cpptools/issues/1341)
|
||||
* Fix reload prompts not appearing in debugging scenarios (after the initial installation). [#1344](https://github.com/Microsoft/vscode-cpptools/issues/1344)
|
||||
* Add a "wait" message when commands are invoked during download/installation. [#1344](https://github.com/Microsoft/vscode-cpptools/issues/1344)
|
||||
* Prevent blank "C/C++ Configuration" from appearing when debugging is started but the language service is not. [#1353](https://github.com/Microsoft/vscode-cpptools/issues/1353)
|
||||
@@ -245,9 +323,9 @@
|
||||
* Improve performance for fetching call stacks with large arguments. [#363](https://github.com/Microsoft/vscode-cpptools/issues/363)
|
||||
|
||||
## Version 0.14.3: November 27, 2017
|
||||
* Fix for disappearing parameter hints tooltip. [#1165](https://github.com/Microsoft/vscode-cpptools/issues/1165)
|
||||
* Fix for parameter hints only showing up after the opening parenthesis. [#902](https://github.com/Microsoft/vscode-cpptools/issues/902), [#819](https://github.com/Microsoft/vscode-cpptools/issues/819)
|
||||
* Fix for customer reported crashes in the TypeScript extension code. [#1240](https://github.com/Microsoft/vscode-cpptools/issues/1240), [#1245](https://github.com/Microsoft/vscode-cpptools/issues/1245)
|
||||
* Fix disappearing parameter hints tooltip. [#1165](https://github.com/Microsoft/vscode-cpptools/issues/1165)
|
||||
* Fix parameter hints only showing up after the opening parenthesis. [#902](https://github.com/Microsoft/vscode-cpptools/issues/902), [#819](https://github.com/Microsoft/vscode-cpptools/issues/819)
|
||||
* Fix customer reported crashes in the TypeScript extension code. [#1240](https://github.com/Microsoft/vscode-cpptools/issues/1240), [#1245](https://github.com/Microsoft/vscode-cpptools/issues/1245)
|
||||
* Fix .browse.VC-#.db files being unnecessarily created when an shm file exists. [#1234](https://github.com/Microsoft/vscode-cpptools/issues/1234)
|
||||
* Fix language service to only activate after a C/C++ file is opened or a C/Cpp command is used (not onDebug).
|
||||
* Fix database resetting if shutdown got blocked by an IntelliSense operation. [#1260](https://github.com/Microsoft/vscode-cpptools/issues/1260)
|
||||
@@ -315,7 +393,7 @@
|
||||
* Support `${env:VAR}` syntax for environment variables in `c_cpp_properties.json`. [#1000](https://github.com/Microsoft/vscode-cpptools/issues/1000)
|
||||
* Support semicolon delimiters for include paths in `c_cpp_properties.json` to better support environment variables. [#1001](https://github.com/Microsoft/vscode-cpptools/issues/1001)
|
||||
* Add `__LITTLE_ENDIAN__=1` to default defines so that "endian.h" is not needed on Mac projects. [#1005](https://github.com/Microsoft/vscode-cpptools/issues/1005)
|
||||
* Fix for source code files on Windows with incorrect casing. [#984](https://github.com/Microsoft/vscode-cpptools/issues/984)
|
||||
* Fix source code files on Windows with incorrect casing. [#984](https://github.com/Microsoft/vscode-cpptools/issues/984)
|
||||
|
||||
## Version 0.12.3: August 17, 2017
|
||||
* Fix regression for paths containing multibyte characters. [#958](https://github.com/Microsoft/vscode-cpptools/issues/958)
|
||||
@@ -351,7 +429,7 @@
|
||||
* Update Microsoft Visual C++ debugger to Visual Studio 2017 released components.
|
||||
* Fix issue with showing wrong thread. [#550](https://github.com/Microsoft/vscode-cpptools/issues/550)
|
||||
* Fix issue with binaries compiled with /FASTLINK causing debugger to hang. [#484](https://github.com/Microsoft/vscode-cpptools/issues/484)
|
||||
* Fix issue in MinGW/Cygwin debugging where stop debugging causes VS Code to hang. [Microsoft/MIEngine#636](https://github.com/Microsoft/MIEngine/pull/636)
|
||||
* Fix issue in MinGW/Cygwin debugging where stop debugging causes VS Code to hang. [PR Microsoft/MIEngine#636](https://github.com/Microsoft/MIEngine/pull/636)
|
||||
|
||||
## Version 0.12.0: June 26, 2017
|
||||
* The default IntelliSense engine now provides semantic-aware autocomplete suggestions for `.`, `->`, and `::` operators. [#13](https://github.com/Microsoft/vscode-cpptools/issues/13)
|
||||
@@ -368,8 +446,8 @@
|
||||
* Fix `Go to Definition` not working until all `browse.path` files are re-scanned. [#788](https://github.com/Microsoft/vscode-cpptools/issues/788)
|
||||
|
||||
## Version 0.11.4: June 2, 2017
|
||||
* Fix for `System.Xml.Serialization.XmlSerializationReader threw an exception` when debugging on Linux. [#792](https://github.com/Microsoft/vscode-cpptools/issues/792)
|
||||
* Fix for escaping for `${workspaceRoot}` in `launch.json`.
|
||||
* Fix `System.Xml.Serialization.XmlSerializationReader threw an exception` when debugging on Linux. [#792](https://github.com/Microsoft/vscode-cpptools/issues/792)
|
||||
* Fix escaping for `${workspaceRoot}` in `launch.json`.
|
||||
|
||||
## Version 0.11.3: May 31, 2017
|
||||
* Fix `x86_64-pc-linux-gnu` and `x86_64-linux-gnu` paths missing from the default `includePath`.
|
||||
@@ -417,7 +495,7 @@
|
||||
|
||||
## Version 0.10.5: March 21, 2017
|
||||
* Fix a crash that randomly occurred when the size of a document increased. [#430](https://github.com/Microsoft/vscode-cpptools/issues/430)
|
||||
* Fix for browsing not working for Linux/Mac stdlib.h functions. [#578](https://github.com/Microsoft/vscode-cpptools/issues/578)
|
||||
* Fix browsing not working for Linux/Mac stdlib.h functions. [#578](https://github.com/Microsoft/vscode-cpptools/issues/578)
|
||||
* Additional fixes for switch header/source not respecting `files.exclude`. [#485](https://github.com/Microsoft/vscode-cpptools/issues/485)
|
||||
* Made `editor.quickSuggestions` dependent on `C_Cpp.autocomplete`. [#572](https://github.com/Microsoft/vscode-cpptools/issues/572)
|
||||
* We recommend you close and reopen your settings.json file anytime you change the `C_Cpp.autocomplete` setting. [More info here](https://github.com/Microsoft/vscode-cpptools/releases).
|
||||
@@ -497,7 +575,7 @@
|
||||
* Switch between header and source.
|
||||
* Control which files are processed under include path.
|
||||
|
||||
## Version 0.6.1: June 03, 2016
|
||||
## Version 0.6.1: June 3, 2016
|
||||
* Bug fixes.
|
||||
|
||||
## Version 0.6.0: May 24, 2016
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
This preview release of the extension adds language support for C/C++ to Visual Studio Code including:
|
||||
* Language service
|
||||
* Code Formatting (clang-format)
|
||||
* Auto-Completion (experimental)
|
||||
* Auto-Completion
|
||||
* Symbol Searching
|
||||
* Go to Definition/Declaration
|
||||
* Peek Definition/Declaration
|
||||
|
||||
@@ -205,12 +205,8 @@
|
||||
<tr>
|
||||
<td>
|
||||
<div>
|
||||
<h2 class="caption">September 2018 Update</h2>
|
||||
<div>Thank you for installing the C/C++ extension. In the September update, we added a preview of semantic-aware Go To Definition. This allows Go To Definition to work for local variables.
|
||||
In addition, when the Go To Definition request references a symbol defined in the current translation unit, other incorrect symbols in the workspace with the same identifier will be
|
||||
filtered from the results.<br/>
|
||||
<br/>
|
||||
We also added a new setting: <code>C_Cpp.updateChannel</code> to facilitate installing Insiders releases of the C++ extension.<br/>
|
||||
<h2 class="caption">January 2019 Update</h2>
|
||||
<div>Thank you for installing the C/C++ extension. In the January update, we added documentation comments for hover, completion, and signature help.<br/>
|
||||
<br/>
|
||||
Additional features and bug fixes are detailed in the <a href="https://github.com/Microsoft/vscode-cpptools/releases">full release notes</a>.</div>
|
||||
</div>
|
||||
@@ -235,9 +231,9 @@
|
||||
<td>
|
||||
<div>
|
||||
<h3 class="caption">Blog Posts</h3>
|
||||
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2018/12/05/visual-studio-code-cpp-extension-october-2018-update-and-a-simplified-insiders-program/">October 2018 Update</a></div>
|
||||
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2018/08/23/visual-studio-code-c-c-extension-august-2018-update/">August 2018 Update</a></div>
|
||||
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2018/07/25/visual-studio-code-cc-extension-july-2018-update-and-intellisense-auto-configuration-for-cmake/">July 2018 Update</a></div>
|
||||
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2018/06/21/visual-studio-code-cc-extension-june-2018-update/">June 2018 Update</a></div>
|
||||
<div><a href="https://blogs.msdn.microsoft.com/vcblog/2016/03/31/cc-extension-for-visual-studio-code/">C/C++ Extension anouncement</a></div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
|
||||
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
|
||||
|
||||
THIRD PARTY SOFTWARE NOTICES AND INFORMATION
|
||||
Do Not Translate or Localize
|
||||
|
||||
Microsoft C/C++ Extension for Visual Studio Code incorporates components from the projects listed below. Microsoft licenses these components under the Microsoft C/C++ Extension for Visual Studio Code license terms, except as noted. The original copyright notices and the licenses under which Microsoft received such components are set forth below for informational purposes. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.
|
||||
This Microsoft product may utilize material made available by third parties under the following license terms. Any source code that Microsoft is required to make available can be found at http://3rdpartysource.microsoft.com. You may also obtain a copy of any such source code (during the period provided by the license) by sending a check or money order for US $5.00 to:
|
||||
|
||||
Source Code Compliance Team
|
||||
Microsoft Corporation
|
||||
One Microsoft Way
|
||||
Redmond, WA 98052 USA
|
||||
|
||||
Please write “Source for [OSS PROJECT NAME]” in the memo line of your payment.
|
||||
|
||||
|
||||
1. agent-base (https://github.com/TooTallNate/node-agent-base)
|
||||
2. ANTLR (http://www.antlr2.org/)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M13.451 5.609l-.579-.939-1.068.812-.076.094c-.335.415-.927 1.341-1.124 2.876l-.021.165.033.163.071.345c0 1.654-1.346 3-3 3-.795 0-1.545-.311-2.107-.868-.563-.567-.873-1.317-.873-2.111 0-1.431 1.007-2.632 2.351-2.929v2.926s2.528-2.087 2.984-2.461h.012l3.061-2.582-4.919-4.1h-1.137v2.404c-3.429.318-6.121 3.211-6.121 6.721 0 1.809.707 3.508 1.986 4.782 1.277 1.282 2.976 1.988 4.784 1.988 3.722 0 6.75-3.028 6.75-6.75 0-1.245-.349-2.468-1.007-3.536z" fill="#F6F6F6"/><path d="M12.6 6.134l-.094.071c-.269.333-.746 1.096-.91 2.375.057.277.092.495.092.545 0 2.206-1.794 4-4 4-1.098 0-2.093-.445-2.817-1.164-.718-.724-1.163-1.718-1.163-2.815 0-2.206 1.794-4 4-4l.351.025v1.85s1.626-1.342 1.631-1.339l1.869-1.577-3.5-2.917v2.218l-.371-.03c-3.176 0-5.75 2.574-5.75 5.75 0 1.593.648 3.034 1.695 4.076 1.042 1.046 2.482 1.694 4.076 1.694 3.176 0 5.75-2.574 5.75-5.75-.001-1.106-.318-2.135-.859-3.012z" fill="#424242"/></svg>
|
||||
|
After Width: | Height: | Size: 986 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M13.451 5.609l-.579-.939-1.068.812-.076.094c-.335.415-.927 1.341-1.124 2.876l-.021.165.033.163.071.345c0 1.654-1.346 3-3 3-.795 0-1.545-.311-2.107-.868-.563-.567-.873-1.317-.873-2.111 0-1.431 1.007-2.632 2.351-2.929v2.926s2.528-2.087 2.984-2.461h.012l3.061-2.582-4.919-4.1h-1.137v2.404c-3.429.318-6.121 3.211-6.121 6.721 0 1.809.707 3.508 1.986 4.782 1.277 1.282 2.976 1.988 4.784 1.988 3.722 0 6.75-3.028 6.75-6.75 0-1.245-.349-2.468-1.007-3.536z" fill="#2D2D30"/><path d="M12.6 6.134l-.094.071c-.269.333-.746 1.096-.91 2.375.057.277.092.495.092.545 0 2.206-1.794 4-4 4-1.098 0-2.093-.445-2.817-1.164-.718-.724-1.163-1.718-1.163-2.815 0-2.206 1.794-4 4-4l.351.025v1.85s1.626-1.342 1.631-1.339l1.869-1.577-3.5-2.917v2.218l-.371-.03c-3.176 0-5.75 2.574-5.75 5.75 0 1.593.648 3.034 1.695 4.076 1.042 1.046 2.482 1.694 4.076 1.694 3.176 0 5.75-2.574 5.75-5.75-.001-1.106-.318-2.135-.859-3.012z" fill="#C5C5C5"/></svg>
|
||||
|
After Width: | Height: | Size: 986 B |
@@ -1,140 +0,0 @@
|
||||
{
|
||||
"class": {
|
||||
"prefix": "class",
|
||||
"body": "\nclass ${1:${TM_FILENAME_BASE}}\n{\nprivate:\n\t${2:/* data */}\npublic:\n\t${1}(${3:/* args */});\n\t~${1}();\n};\n\n${1}::${1}(${3})\n{\n}\n\n${1}::~${1}()\n{\n}\n",
|
||||
"description": "Code snippet for class",
|
||||
"scope": "source.c++, source.objc++"
|
||||
},
|
||||
"classi": {
|
||||
"prefix": "classi",
|
||||
"body": "\nclass ${1:${TM_FILENAME_BASE}}\n{\nprivate:\n\t${2:/* data */}\npublic:\n\t${1}(${3:/* args */}) { $0}\n\t~${1}() { }\n};",
|
||||
"description": "Code snippet for class with inlined constructor/destructor",
|
||||
"scope": "source.c++, source.objc++"
|
||||
},
|
||||
"classt": {
|
||||
"prefix": "classt",
|
||||
"body": "\ntemplate<typename T>\nclass ${1:${TM_FILENAME_BASE}}\n{\nprivate:\n\tT ${2:/* data */}\npublic:\n\t${1}(T ${3:/* args */});\n};\n",
|
||||
"description": "Code snippet for class template",
|
||||
"scope": "source.c++, source.objc++"
|
||||
},
|
||||
"struct": {
|
||||
"prefix": "struct",
|
||||
"body": "\nstruct ${1:${TM_FILENAME_BASE}}\n{\n\t${0:/* data */}\n};\n",
|
||||
"description": "Code snippet for struct",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"union": {
|
||||
"prefix": "union",
|
||||
"body": "\nunion ${1:${TM_FILENAME_BASE}}\n{\n\t${0:/* data */}\n};\n",
|
||||
"description": "Code snippet for union",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"if": {
|
||||
"prefix": "if",
|
||||
"body": "\nif (${1:/* condition */}) {\n\t${0:/* code */}\n}\n",
|
||||
"description": "Code snippet for if()",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"ifel": {
|
||||
"prefix": "ifel",
|
||||
"body": "\nif (${1:/* condition */}) {\n\t${2:/* code */}\n}\nelse {\n\t${0:/* code */}\n}\n",
|
||||
"description": "Code snippet for if() else",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"ifelif": {
|
||||
"prefix": "ifelif",
|
||||
"body": "\nif (${1:/* condition */}) {\n\t${2:/* code */}\n}\nelse if(${3:/* condition */}) {\n\t${4:/* code */}\n}\nelse {\n\t${0:/* code */}\n}\n",
|
||||
"description": "Code snippet for if() else if() else",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"else": {
|
||||
"prefix": "else",
|
||||
"body": "\nelse\n{\n\t${0:/* code */}\n}\n",
|
||||
"description": "Code snippet for else",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"elif": {
|
||||
"prefix": "elif",
|
||||
"body": "\nelse if (${1:/* condition */})\n{\n\t${0:/* code */}\n}\n",
|
||||
"description": "Code snippet for else if ()",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"switch": {
|
||||
"prefix": "switch",
|
||||
"body": "\nswitch (${1:expression})\n{\n\tcase ${2:/* constant-expression */}:\n\t\t${3:/* code */}\n\t\tbreak;\n\n\tdefault:\n\t\tbreak;\n}",
|
||||
"description": "Code snippet for switch",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"main": {
|
||||
"prefix": "main",
|
||||
"body": "main(int argc, char const *argv[])\n{\n\t${1:/* code */}\n\treturn 0;\n}\n",
|
||||
"description": "Code snippet for main()",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"do": {
|
||||
"prefix": "do_",
|
||||
"body": "\ndo\n{\n\t${0:/* code */}\n} while (${1:/* condition */});\n",
|
||||
"description": "Code snippet for do while loop",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"for": {
|
||||
"prefix": "for",
|
||||
"body": "\nfor(${1:size_t} ${2:i} = 0; $2 < ${3:count}; ${4:$2++})\n{\n\t${0:/* code */}\n}\n",
|
||||
"description": "Code snippet for for loop",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"forr": {
|
||||
"prefix": "forr",
|
||||
"body": "\nfor(int ${1:i} = ${2:length} - 1; $1 >= 0; ${3:$1--})\n{\n\t${0:/* code */}\n}\n",
|
||||
"description": "Code snippet for reverse for loop",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"foreach": {
|
||||
"prefix": "foreach",
|
||||
"body": "\nfor(${1:object} = ${2:var} in ${3:collection})\n{\n\t${0:/* code */}\n}\n",
|
||||
"description": "Code snippet for foreach loop",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"forrange": {
|
||||
"prefix": "forrange",
|
||||
"body": "\nfor(auto&& ${1:i} : ${2:v})\n{\n\t$0\n}\n",
|
||||
"description": "Code snippet for range-based forloop",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"while": {
|
||||
"prefix": "while",
|
||||
"body": "\nwhile(${1:/* condition */}){\n\t${2:/* code */}\n}\n",
|
||||
"description": "Code snippet for while loop",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"ifd": {
|
||||
"prefix": "ifnd",
|
||||
"body": "\n#if defined($1)\n\n${0}\n\n#endif // $1\n",
|
||||
"description": "Code snippet for if defined()",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"ifnd": {
|
||||
"prefix": "ifnd",
|
||||
"body": "\n#if !defined($1)\n#define ${1:MACRO}\n\n${0}\n\n#endif // $1\n",
|
||||
"description": "Code snippet for if !defined()",
|
||||
"scope": "source.c, source.objc, source.c++, source.objc++"
|
||||
},
|
||||
"mitl": {
|
||||
"prefix": "mitl",
|
||||
"body": "\n// The MIT License (MIT)\n\n// Copyright (c) ${1:YEAR} ${2:NAME}\n\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the \"Software\"),\n// to deal in the Software without restriction, including without limitation\n// the rights to use, copy, modify, merge, publish, distribute, sublicense,\n// and/or sell copies of the Software, and to permit persons to whom the\n// Software is furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n// DEALINGS IN THE SOFTWARE.\n\n${0:/* code */}\n",
|
||||
"description": "Code snippet for MIT License",
|
||||
"scope": ""
|
||||
},
|
||||
"namesp": {
|
||||
"prefix": "namesp",
|
||||
"body": "\nnamespace ${1:name}\n{\n\t$0\n} // $1\n",
|
||||
"description": "Code snippet for namespace",
|
||||
"scope": "source.c++, source.objc++"
|
||||
},
|
||||
"try": {
|
||||
"prefix": "try",
|
||||
"body": "\ntry\n{\n\t${1:/* code */}\n}\ncatch(${2:const std::exception& e})\n{\n\t${0:std::cerr << e.what() << '\\n';}\n}\n",
|
||||
"description": "Code snippet for try catch block",
|
||||
"scope": "source.c++, source.objc++, source.c++11"
|
||||
}
|
||||
}
|
||||
+28
-13
@@ -12,31 +12,41 @@ const mocha = require('gulp-mocha');
|
||||
const fs = require('fs');
|
||||
const optionsSchemaGenerator = require('./out/tools/GenerateOptionsSchema');
|
||||
|
||||
gulp.task('unitTests', () => {
|
||||
gulp.task('unitTests', (done) => {
|
||||
env.set({
|
||||
CODE_TESTS_PATH: "./out/test/unitTests",
|
||||
});
|
||||
|
||||
gulp.src('./test/runVsCodeTestsWithAbsolutePaths.js', {read: false})
|
||||
return gulp.src('./test/runVsCodeTestsWithAbsolutePaths.js', {read: false})
|
||||
.pipe(mocha({ ui: "tdd" }))
|
||||
.once('error', err => process.exit(1))
|
||||
.once('end', () => process.exit())
|
||||
.once('error', err => {
|
||||
done();
|
||||
process.exit(1);
|
||||
})
|
||||
.once('end', () => {
|
||||
done();
|
||||
process.exit();
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('integrationTests', () => {
|
||||
gulp.task('integrationTests', (done) => {
|
||||
env.set({
|
||||
CODE_TESTS_PATH: "./out/test/integrationTests",
|
||||
CODE_TESTS_WORKSPACE: "./test/integrationTests/testAssets/SimpleCppProject"
|
||||
});
|
||||
|
||||
gulp.src('./test/runVsCodeTestsWithAbsolutePaths.js', {read: false})
|
||||
return gulp.src('./test/runVsCodeTestsWithAbsolutePaths.js', {read: false})
|
||||
.pipe(mocha({ ui: "tdd" }))
|
||||
.once('error', err => process.exit(1))
|
||||
.once('end', () => process.exit())
|
||||
.once('error', err => {
|
||||
done();
|
||||
process.exit(1);
|
||||
})
|
||||
.once('end', () => {
|
||||
done();
|
||||
process.exit();
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('allTests', ['unitTests', 'integrationTests']);
|
||||
|
||||
/// Misc Tasks
|
||||
const allTypeScript = [
|
||||
'src/**/*.ts',
|
||||
@@ -55,7 +65,7 @@ const lintReporter = (output, file, options) => {
|
||||
};
|
||||
|
||||
gulp.task('tslint', () => {
|
||||
gulp.src(allTypeScript)
|
||||
return gulp.src(allTypeScript)
|
||||
.pipe(tslint({
|
||||
program: require('tslint').Linter.createProgram("./tsconfig.json"),
|
||||
configuration: "./tslint.json"
|
||||
@@ -66,14 +76,19 @@ gulp.task('tslint', () => {
|
||||
}))
|
||||
});
|
||||
|
||||
gulp.task('pr-check', () => {
|
||||
gulp.task('pr-check', (done) => {
|
||||
const packageJson = JSON.parse(fs.readFileSync('./package.json').toString());
|
||||
if (packageJson.activationEvents.length !== 1 && packageJson.activationEvents[0] !== '*') {
|
||||
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`.');
|
||||
done();
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
gulp.task('generateOptionsSchema', () => {
|
||||
gulp.task('generateOptionsSchema', (done) => {
|
||||
optionsSchemaGenerator.generateOptionsSchema();
|
||||
|
||||
done();
|
||||
});
|
||||
Generated
+2719
-392
File diff suppressed because it is too large
Load Diff
+72
-71
@@ -2,7 +2,7 @@
|
||||
"name": "cpptools",
|
||||
"displayName": "C/C++",
|
||||
"description": "C/C++ IntelliSense, debugging, and code browsing.",
|
||||
"version": "0.19.0",
|
||||
"version": "0.21.0",
|
||||
"publisher": "ms-vscode",
|
||||
"preview": true,
|
||||
"icon": "LanguageCCPP_color_128x.png",
|
||||
@@ -12,7 +12,7 @@
|
||||
},
|
||||
"license": "SEE LICENSE IN LICENSE.txt",
|
||||
"engines": {
|
||||
"vscode": "^1.23.0"
|
||||
"vscode": "^1.26.0"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Microsoft/vscode-cpptools/issues",
|
||||
@@ -108,7 +108,7 @@
|
||||
"Disabled"
|
||||
],
|
||||
"default": "Default",
|
||||
"description": "Controls the IntelliSense provider. \"Tag Parser\" provides \"fuzzy\" results that are not context-aware. \"Default\" provides context-aware results and is in preview mode - member list, hover tooltips, and error squiggles are currently implemented. Features not yet implemented in the new default engine will use the tag parser engine instead.",
|
||||
"description": "Controls the IntelliSense provider. \"Tag Parser\" provides \"fuzzy\" results that are not context-aware. \"Default\" provides context-aware results. \"Disabled\" turns off C/C++ language service features.",
|
||||
"scope": "resource"
|
||||
},
|
||||
"C_Cpp.intelliSenseEngineFallback": {
|
||||
@@ -472,88 +472,83 @@
|
||||
"commands": [
|
||||
{
|
||||
"command": "C_Cpp.ConfigurationSelect",
|
||||
"title": "Select a Configuration...",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.configurationSelect.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.ConfigurationProviderSelect",
|
||||
"title": "Change Configuration Provider...",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.configurationProviderSelect.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.ConfigurationEdit",
|
||||
"title": "Edit Configurations...",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.configurationEdit.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.GoToDeclaration",
|
||||
"title": "Go to Declaration",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.goToDeclaration.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.PeekDeclaration",
|
||||
"title": "Peek Declaration",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.peekDeclaration.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.SwitchHeaderSource",
|
||||
"title": "Switch Header/Source",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.switchHeaderSource.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.Navigate",
|
||||
"title": "Navigate...",
|
||||
"category": "C/Cpp"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.ToggleSnippets",
|
||||
"title": "Toggle Snippets",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.navigate.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.ToggleErrorSquiggles",
|
||||
"title": "Toggle Error Squiggles",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.toggleErrorSquiggles.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.ToggleIncludeFallback",
|
||||
"title": "Toggle IntelliSense Engine Fallback on Include Errors",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.toggleIncludeFallback.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.ToggleDimInactiveRegions",
|
||||
"title": "Toggle Inactive Region Colorization",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.toggleDimInactiveRegions.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.ShowReleaseNotes",
|
||||
"title": "Show Release Notes",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.showReleaseNotes.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.ResetDatabase",
|
||||
"title": "Reset IntelliSense Database",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.resetDatabase.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.PauseParsing",
|
||||
"title": "Pause Parsing",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.pauseParsing.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.ResumeParsing",
|
||||
"title": "Resume Parsing",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.resumeParsing.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.ShowParsingCommands",
|
||||
"title": "Show Parsing Commands",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.showParsingCommands.title%",
|
||||
"category": "C/C++"
|
||||
},
|
||||
{
|
||||
"command": "C_Cpp.TakeSurvey",
|
||||
"title": "Take Survey",
|
||||
"category": "C/Cpp"
|
||||
"title": "%c_cpp.command.takeSurvey.title%",
|
||||
"category": "C/C++"
|
||||
}
|
||||
],
|
||||
"keybindings": [
|
||||
@@ -728,8 +723,12 @@
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"properties": {
|
||||
"name": "string",
|
||||
"value": "string"
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"default": []
|
||||
@@ -801,7 +800,12 @@
|
||||
},
|
||||
"externalConsole": {
|
||||
"type": "boolean",
|
||||
"description": "If true, a console is launched for the debuggee. If false, no console is launched. Note this option is ignored in some cases for technical reasons.",
|
||||
"description": "If true, a console is launched for the debuggee. If false, on Linux and Windows, it will appear in the Integrated Console.",
|
||||
"default": false
|
||||
},
|
||||
"avoidWindowsConsoleRedirection": {
|
||||
"type": "boolean",
|
||||
"description": "If true, disables debuggee console redirection that is required for Integrated Terminal support.",
|
||||
"default": false
|
||||
},
|
||||
"sourceFileMap": {
|
||||
@@ -1140,8 +1144,12 @@
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"properties": {
|
||||
"name": "string",
|
||||
"value": "string"
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"default": []
|
||||
@@ -1354,22 +1362,12 @@
|
||||
},
|
||||
"configurationDefaults": {
|
||||
"[cpp]": {
|
||||
"editor.autoIndent": false
|
||||
"editor.wordBasedSuggestions": false
|
||||
},
|
||||
"[c]": {
|
||||
"editor.autoIndent": false
|
||||
"editor.wordBasedSuggestions": false
|
||||
}
|
||||
},
|
||||
"snippets": [
|
||||
{
|
||||
"language": "cpp",
|
||||
"path": "./cpp_snippets.json"
|
||||
},
|
||||
{
|
||||
"language": "c",
|
||||
"path": "./cpp_snippets.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "npm run vscode:prepublish",
|
||||
@@ -1387,7 +1385,9 @@
|
||||
"devDependencies": {
|
||||
"@types/mocha": "^2.2.43",
|
||||
"@types/node": "^8.0.46",
|
||||
"gulp": "3.9.1",
|
||||
"async-child-process": "^1.1.1",
|
||||
"child-process": "^1.0.2",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-env": "0.4.0",
|
||||
"gulp-mocha": "5.0.0",
|
||||
"gulp-tslint": "8.1.2",
|
||||
@@ -1400,6 +1400,7 @@
|
||||
"vscode": "^1.1.18"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/minimatch": "^3.0.3",
|
||||
"http-proxy-agent": "~2.1.0",
|
||||
"https-proxy-agent": "~2.2.0",
|
||||
"jsonc-parser": "^1.0.0",
|
||||
@@ -1409,14 +1410,14 @@
|
||||
"vscode-cpptools": "2.1.1",
|
||||
"vscode-debugadapter": "~1.24.0",
|
||||
"vscode-debugprotocol": "~1.24.0",
|
||||
"vscode-extension-telemetry": "~0.0.11",
|
||||
"vscode-languageclient": "3.5.1",
|
||||
"yauzl": "~2.8.0"
|
||||
"vscode-extension-telemetry": "~0.1.0",
|
||||
"vscode-languageclient": "5.1.1",
|
||||
"yauzl": "~2.10.0"
|
||||
},
|
||||
"runtimeDependencies": [
|
||||
{
|
||||
"description": "C/C++ language components (Linux / x86_64)",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=2010302",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=2037608",
|
||||
"platforms": [
|
||||
"linux"
|
||||
],
|
||||
@@ -1430,7 +1431,7 @@
|
||||
},
|
||||
{
|
||||
"description": "C/C++ language components (Linux / x86)",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=2010301",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=2037526",
|
||||
"platforms": [
|
||||
"linux"
|
||||
],
|
||||
@@ -1446,7 +1447,7 @@
|
||||
},
|
||||
{
|
||||
"description": "C/C++ language components (OS X)",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=2010303",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=2037527",
|
||||
"platforms": [
|
||||
"darwin"
|
||||
],
|
||||
@@ -1457,7 +1458,7 @@
|
||||
},
|
||||
{
|
||||
"description": "C/C++ language components (Windows)",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=2010204",
|
||||
"url": "https://go.microsoft.com/fwlink/?linkid=2037609",
|
||||
"platforms": [
|
||||
"win32"
|
||||
],
|
||||
@@ -1511,7 +1512,7 @@
|
||||
},
|
||||
{
|
||||
"description": "Mono Framework Assemblies",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=816539",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=2027135",
|
||||
"platforms": [
|
||||
"linux",
|
||||
"darwin"
|
||||
@@ -1520,7 +1521,7 @@
|
||||
},
|
||||
{
|
||||
"description": "Mono Runtime (Linux / x86)",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=816540",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=2027410",
|
||||
"platforms": [
|
||||
"linux"
|
||||
],
|
||||
@@ -1535,7 +1536,7 @@
|
||||
},
|
||||
{
|
||||
"description": "Mono Runtime (Linux / x86_64)",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=816541",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=2027416",
|
||||
"platforms": [
|
||||
"linux"
|
||||
],
|
||||
@@ -1548,7 +1549,7 @@
|
||||
},
|
||||
{
|
||||
"description": "Mono Runtime (OS X)",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=816542",
|
||||
"url": "https://go.microsoft.com/fwlink/?LinkId=2027403",
|
||||
"platforms": [
|
||||
"darwin"
|
||||
],
|
||||
@@ -1578,4 +1579,4 @@
|
||||
"binaries": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"c_cpp.command.configurationSelect.title": "Scegli una configurazione...",
|
||||
"c_cpp.command.configurationProviderSelect.title": "Cambia provider configurazioni...",
|
||||
"c_cpp.command.configurationEdit.title": "Modifica configurazioni...",
|
||||
"c_cpp.command.goToDeclaration.title": "Vai a dichiarazione",
|
||||
"c_cpp.command.peekDeclaration.title": "Visualizza dichiarazione",
|
||||
"c_cpp.command.switchHeaderSource.title": "Visualizza Header/Sorgente",
|
||||
"c_cpp.command.navigate.title": "Naviga...",
|
||||
"c_cpp.command.toggleErrorSquiggles.title": "Attiva/Disattiva sottolineamento errori",
|
||||
"c_cpp.command.toggleIncludeFallback.title": "Attiva/Disattiva motore di fallback IntelliSense negli errori di inclusione",
|
||||
"c_cpp.command.toggleDimInactiveRegions.title": "Attiva/Disattiva colorazione regioni inattive",
|
||||
"c_cpp.command.showReleaseNotes.title": "Mostra note di rilascio",
|
||||
"c_cpp.command.resetDatabase.title": "Reimposta il database di IntelliSense",
|
||||
"c_cpp.command.pauseParsing.title": "Metti in pausa l'analisi del codice",
|
||||
"c_cpp.command.resumeParsing.title": "Riprendi l'analisi del codice",
|
||||
"c_cpp.command.showParsingCommands.title": "Mostra comandi per l'analisi del codice",
|
||||
"c_cpp.command.takeSurvey.title": "Partecipa al Sondaggio"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"c_cpp.command.configurationSelect.title": "Select a configuration...",
|
||||
"c_cpp.command.configurationProviderSelect.title": "Change configuration provider...",
|
||||
"c_cpp.command.configurationEdit.title": "Edit configurations...",
|
||||
"c_cpp.command.goToDeclaration.title": "Go to declaration",
|
||||
"c_cpp.command.peekDeclaration.title": "Peek declaration",
|
||||
"c_cpp.command.switchHeaderSource.title": "Switch Header/Source",
|
||||
"c_cpp.command.navigate.title": "Navigate...",
|
||||
"c_cpp.command.toggleErrorSquiggles.title": "Toggle error squiggles",
|
||||
"c_cpp.command.toggleIncludeFallback.title": "Toggle IntelliSense engine fallback on include errors",
|
||||
"c_cpp.command.toggleDimInactiveRegions.title": "Toggle inactive region colorization",
|
||||
"c_cpp.command.showReleaseNotes.title": "Show release notes",
|
||||
"c_cpp.command.resetDatabase.title": "Reset IntelliSense database",
|
||||
"c_cpp.command.pauseParsing.title": "Pause parsing",
|
||||
"c_cpp.command.resumeParsing.title": "Resume parsing",
|
||||
"c_cpp.command.showParsingCommands.title": "Show parsing commands",
|
||||
"c_cpp.command.takeSurvey.title": "Take survey"
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All Rights Reserved.
|
||||
* See 'LICENSE' in the project root for license information.
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
|
||||
import * as util from '../common';
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
class RefreshButton implements vscode.QuickInputButton {
|
||||
get iconPath(): { dark: vscode.Uri; light: vscode.Uri } {
|
||||
const refreshImagePathDark: string = util.getExtensionFilePath("assets/Refresh_inverse.svg");
|
||||
const refreshImagePathLight: string = util.getExtensionFilePath("assets/Refresh.svg");
|
||||
|
||||
return {
|
||||
dark: vscode.Uri.file(refreshImagePathDark),
|
||||
light: vscode.Uri.file(refreshImagePathLight)
|
||||
};
|
||||
}
|
||||
|
||||
get tooltip(): string {
|
||||
return "Refresh process list";
|
||||
}
|
||||
}
|
||||
|
||||
export interface AttachItem extends vscode.QuickPickItem {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export function showQuickPick(getAttachItems: () => Promise<AttachItem[]>): Promise<string> {
|
||||
return getAttachItems().then(processEntries => {
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
let quickPick: vscode.QuickPick<AttachItem> = vscode.window.createQuickPick<AttachItem>();
|
||||
quickPick.title = "Attach to process";
|
||||
quickPick.canSelectMany = false;
|
||||
quickPick.matchOnDescription = true;
|
||||
quickPick.matchOnDetail = true;
|
||||
quickPick.placeholder = "Select the process to attach to";
|
||||
quickPick.items = processEntries;
|
||||
quickPick.buttons = [new RefreshButton()];
|
||||
|
||||
let disposables: vscode.Disposable[] = [];
|
||||
|
||||
quickPick.onDidTriggerButton(button => {
|
||||
getAttachItems().then(processEntries => quickPick.items = processEntries);
|
||||
}, undefined, disposables);
|
||||
|
||||
quickPick.onDidAccept(() => {
|
||||
if (quickPick.selectedItems.length !== 1) {
|
||||
reject(new Error("Process not selected"));
|
||||
}
|
||||
|
||||
let selectedId: string = quickPick.selectedItems[0].id;
|
||||
|
||||
disposables.forEach(item => item.dispose());
|
||||
quickPick.dispose();
|
||||
|
||||
resolve(selectedId);
|
||||
}, undefined, disposables);
|
||||
|
||||
quickPick.onDidHide(() => {
|
||||
disposables.forEach(item => item.dispose());
|
||||
quickPick.dispose();
|
||||
|
||||
reject(new Error("Process not selected."));
|
||||
}, undefined, disposables);
|
||||
|
||||
quickPick.show();
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
import { execChildProcess } from '../common';
|
||||
import { PsProcessParser } from './nativeAttach';
|
||||
import { AttachItem, showQuickPick } from './attachQuickPick';
|
||||
|
||||
import * as debugUtils from './utils';
|
||||
import * as fs from 'fs';
|
||||
@@ -13,10 +14,6 @@ import * as path from 'path';
|
||||
import * as util from '../common';
|
||||
import * as vscode from 'vscode';
|
||||
|
||||
export interface AttachItem extends vscode.QuickPickItem {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AttachItemsProvider {
|
||||
getAttachItems(): Promise<AttachItem[]>;
|
||||
}
|
||||
@@ -29,19 +26,7 @@ export class AttachPicker {
|
||||
if (!ready) {
|
||||
util.displayExtensionNotReadyPrompt();
|
||||
} else {
|
||||
return this.attachItemsProvider.getAttachItems()
|
||||
.then(processEntries => {
|
||||
let attachPickOptions: vscode.QuickPickOptions = {
|
||||
matchOnDescription: true,
|
||||
matchOnDetail: true,
|
||||
placeHolder: "Select the process to attach to"
|
||||
};
|
||||
|
||||
return vscode.window.showQuickPick(processEntries, attachPickOptions)
|
||||
.then(chosenProcess => {
|
||||
return chosenProcess ? chosenProcess.id : Promise.reject<string>(new Error("Process not selected."));
|
||||
});
|
||||
});
|
||||
return showQuickPick(() => this.attachItemsProvider.getAttachItems());
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -74,7 +59,7 @@ export class RemoteAttachPicker {
|
||||
!fs.existsSync(pipeTransport.pipeProgram)) {
|
||||
const pipeProgramStr: string = pipeTransport.pipeProgram.toLowerCase().trim();
|
||||
const expectedArch: debugUtils.ArchType = debugUtils.ArchType[process.arch];
|
||||
|
||||
|
||||
// Check for pipeProgram
|
||||
if (!fs.existsSync(config.pipeTransport.pipeProgram)) {
|
||||
pipeProgram = debugUtils.ArchitectureReplacer.checkAndReplaceWSLPipeProgram(pipeProgramStr, expectedArch);
|
||||
@@ -84,7 +69,7 @@ export class RemoteAttachPicker {
|
||||
if (!pipeProgram && config.pipeTransport.pipeCwd) {
|
||||
const pipeCwdStr: string = config.pipeTransport.pipeCwd.toLowerCase().trim();
|
||||
const newPipeProgramStr: string = path.join(pipeCwdStr, pipeProgramStr);
|
||||
|
||||
|
||||
if (!fs.existsSync(newPipeProgramStr)) {
|
||||
pipeProgram = debugUtils.ArchitectureReplacer.checkAndReplaceWSLPipeProgram(newPipeProgramStr, expectedArch);
|
||||
}
|
||||
@@ -123,7 +108,7 @@ export class RemoteAttachPicker {
|
||||
const command: string = `sh -c 'uname && if [ $(uname) = "Linux" ] ; then ${PsProcessParser.psLinuxCommand} ; elif [ $(uname) = "Darwin" ] ; ` +
|
||||
`then ${PsProcessParser.psDarwinCommand}; fi'`;
|
||||
|
||||
return execChildProcess(`${pipeCmd} "${command}"`, null, this._channel).then(output => {
|
||||
return execChildProcess(`${pipeCmd} '${command}'`, null, this._channel).then(output => {
|
||||
// OS will be on first line
|
||||
// Processess will follow if listed
|
||||
let lines: string[] = output.split(/\r?\n/);
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
import * as child_process from 'child_process';
|
||||
import * as os from 'os';
|
||||
import { AttachItem, AttachItemsProvider } from './attachToProcess';
|
||||
import { AttachItemsProvider } from './attachToProcess';
|
||||
import { AttachItem } from './attachQuickPick';
|
||||
|
||||
class Process {
|
||||
constructor(public name: string, public pid: string, public commandLine: string) { }
|
||||
|
||||
@@ -29,6 +29,7 @@ import { SettingsTracker, getTracker } from './settingsTracker';
|
||||
import { getTestHook, TestHook } from '../testHook';
|
||||
import { getCustomConfigProviders, CustomConfigurationProviderCollection, CustomConfigurationProvider1 } from '../LanguageServer/customProviders';
|
||||
import { ABTestSettings, getABTestSettings } from '../abTesting';
|
||||
import * as fs from 'fs';
|
||||
|
||||
let ui: UI;
|
||||
const configProviderTimeout: number = 2000;
|
||||
@@ -353,6 +354,10 @@ class DefaultClient implements Client {
|
||||
|
||||
private createLanguageClient(allClients: ClientCollection, workspaceFolder?: vscode.WorkspaceFolder): LanguageClient {
|
||||
let serverModule: string = getLanguageServerFileName();
|
||||
let exeExists: boolean = fs.existsSync(serverModule);
|
||||
if (!exeExists) {
|
||||
throw String('Missing binary at ' + serverModule);
|
||||
}
|
||||
let serverName: string = this.getName(workspaceFolder);
|
||||
|
||||
let serverOptions: ServerOptions = {
|
||||
|
||||
@@ -119,7 +119,7 @@ export class ClientCollection {
|
||||
this.languageClients.set(key, cpptools.createNullClient());
|
||||
}
|
||||
|
||||
if (this.activeClient === client) {
|
||||
if (this.activeClient === client && this.activeDocument) {
|
||||
this.activeClient = this.getClientFor(this.activeDocument.uri);
|
||||
this.activeClient.activeDocumentChanged(this.activeDocument);
|
||||
}
|
||||
@@ -154,7 +154,7 @@ export class ClientCollection {
|
||||
client.TrackedDocuments.forEach(document => this.transferOwnership(document, client));
|
||||
client.TrackedDocuments.clear();
|
||||
|
||||
if (this.activeClient === client) {
|
||||
if (this.activeClient === client && this.activeDocument) {
|
||||
// Need to make a different client the active client.
|
||||
this.activeClient = this.getClientFor(this.activeDocument.uri);
|
||||
this.activeClient.activeDocumentChanged(this.activeDocument);
|
||||
|
||||
@@ -215,6 +215,10 @@ export class CppProperties {
|
||||
if (this.configurationIncomplete && this.defaultIncludes && this.defaultFrameworks && this.vcpkgPathReady) {
|
||||
let configuration: Configuration = this.CurrentConfiguration;
|
||||
let settings: CppSettings = new CppSettings(this.rootUri);
|
||||
let isUnset: (input: any) => boolean = (input: any) => {
|
||||
// default values for "default" config settings is null.
|
||||
return input === null;
|
||||
};
|
||||
|
||||
// Anything that has a vscode setting for it will be resolved in updateServerOnFolderSettingsChange.
|
||||
// So if a property is currently unset, but has a vscode setting, don't set it yet, otherwise the linkage
|
||||
@@ -222,32 +226,32 @@ export class CppProperties {
|
||||
|
||||
// Only add settings from the default compiler if user hasn't explicitly set the corresponding VS Code setting.
|
||||
|
||||
if (!settings.defaultIncludePath) {
|
||||
if (isUnset(settings.defaultIncludePath)) {
|
||||
// We don't add system includes to the includePath anymore. The language server has this information.
|
||||
let abTestSettings: ABTestSettings = getABTestSettings();
|
||||
let rootFolder: string = abTestSettings.UseRecursiveIncludes ? "${workspaceFolder}/**" : "${workspaceFolder}";
|
||||
configuration.includePath = [rootFolder].concat(this.vcpkgIncludes);
|
||||
}
|
||||
// browse.path is not set by default anymore. When it is not set, the includePath will be used instead.
|
||||
if (!settings.defaultDefines) {
|
||||
if (isUnset(settings.defaultDefines)) {
|
||||
configuration.defines = (process.platform === 'win32') ? ["_DEBUG", "UNICODE", "_UNICODE"] : [];
|
||||
}
|
||||
if (!settings.defaultMacFrameworkPath && process.platform === 'darwin') {
|
||||
if (isUnset(settings.defaultMacFrameworkPath) && process.platform === 'darwin') {
|
||||
configuration.macFrameworkPath = this.defaultFrameworks;
|
||||
}
|
||||
if (!settings.defaultWindowsSdkVersion && this.defaultWindowsSdkVersion && process.platform === 'win32') {
|
||||
if (isUnset(settings.defaultWindowsSdkVersion) && this.defaultWindowsSdkVersion && process.platform === 'win32') {
|
||||
configuration.windowsSdkVersion = this.defaultWindowsSdkVersion;
|
||||
}
|
||||
if (!settings.defaultCompilerPath && this.defaultCompilerPath) {
|
||||
if (isUnset(settings.defaultCompilerPath) && this.defaultCompilerPath) {
|
||||
configuration.compilerPath = this.defaultCompilerPath;
|
||||
}
|
||||
if (!settings.defaultCStandard && this.defaultCStandard) {
|
||||
if (isUnset(settings.defaultCStandard) && this.defaultCStandard) {
|
||||
configuration.cStandard = this.defaultCStandard;
|
||||
}
|
||||
if (!settings.defaultCppStandard && this.defaultCppStandard) {
|
||||
if (isUnset(settings.defaultCppStandard) && this.defaultCppStandard) {
|
||||
configuration.cppStandard = this.defaultCppStandard;
|
||||
}
|
||||
if (!settings.defaultIntelliSenseMode) {
|
||||
if (isUnset(settings.defaultIntelliSenseMode)) {
|
||||
configuration.intelliSenseMode = this.defaultIntelliSenseMode;
|
||||
}
|
||||
this.configurationIncomplete = false;
|
||||
@@ -260,7 +264,7 @@ export class CppProperties {
|
||||
Object.assign(result, this.configurationJson.env);
|
||||
}
|
||||
|
||||
result["workspaceFolderBasename"] = path.basename(this.rootUri.fsPath);
|
||||
result["workspaceFolderBasename"] = this.rootUri ? path.basename(this.rootUri.fsPath) : "";
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -431,11 +435,11 @@ export class CppProperties {
|
||||
private updateConfiguration(property: string, defaultValue: string, env: Environment): string;
|
||||
private updateConfiguration(property: string | boolean, defaultValue: boolean, env: Environment): boolean;
|
||||
private updateConfiguration(property, defaultValue, env): any {
|
||||
if (typeof property === "string" || typeof defaultValue === "string") {
|
||||
if (util.isString(property) || util.isString(defaultValue)) {
|
||||
return this.resolveVariables(property, defaultValue, env);
|
||||
} else if (typeof property === "boolean" || typeof defaultValue === "boolean") {
|
||||
} else if (util.isBoolean(property) || util.isBoolean(defaultValue)) {
|
||||
return this.resolveVariables(property, defaultValue, env);
|
||||
} else if (property instanceof Array || defaultValue instanceof Array) {
|
||||
} else if (util.isArrayOfString(property) || util.isArrayOfString(defaultValue)) {
|
||||
if (property) {
|
||||
return this.resolveAndSplit(property, defaultValue, env);
|
||||
} else if (property === undefined && defaultValue) {
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
'use strict';
|
||||
|
||||
import { CustomConfigurationProvider, Version, SourceFileConfigurationItem, WorkspaceBrowseConfiguration } from 'vscode-cpptools';
|
||||
import * as vscode from 'vscode';
|
||||
import { CustomConfigurationProvider, Version, SourceFileConfigurationItem, WorkspaceBrowseConfiguration } from 'vscode-cpptools';
|
||||
import { CppSettings } from './settings';
|
||||
|
||||
/**
|
||||
* An interface that is guaranteed to be backward compatible with version 0
|
||||
@@ -135,6 +136,11 @@ export class CustomConfigurationProviderCollection {
|
||||
}
|
||||
|
||||
public add(provider: CustomConfigurationProvider, version: Version): boolean {
|
||||
if (new CppSettings().intelliSenseEngine === "Disabled") {
|
||||
console.warn("IntelliSense is disabled. Provider will not be registered.");
|
||||
return false;
|
||||
}
|
||||
|
||||
let wrapper: CustomProviderWrapper = new CustomProviderWrapper(provider, version);
|
||||
if (!wrapper.isValid) {
|
||||
this.logProblems(provider, version);
|
||||
|
||||
@@ -22,6 +22,7 @@ import { Range } from 'vscode-languageclient';
|
||||
import { ChildProcess, spawn, execSync } from 'child_process';
|
||||
import * as tmp from 'tmp';
|
||||
import { getTargetBuildInfo } from '../githubAPI';
|
||||
import { PackageVersion } from '../packageVersion';
|
||||
|
||||
let prevCrashFile: string;
|
||||
let clients: ClientCollection;
|
||||
@@ -105,6 +106,10 @@ function onActivationEvent(): void {
|
||||
}
|
||||
|
||||
function realActivation(): void {
|
||||
if (new CppSettings().intelliSenseEngine === "Disabled") {
|
||||
throw new Error("Do not activate the extension when IntelliSense is disabled.");
|
||||
}
|
||||
|
||||
realActivationOccurred = true;
|
||||
console.log("starting language server");
|
||||
clients = new ClientCollection();
|
||||
@@ -235,17 +240,19 @@ async function installVsix(vsixLocation: string, updateChannel: string): Promise
|
||||
const vsCodeScriptPath: string = function(platformInfo): string {
|
||||
if (platformInfo.platform === 'win32') {
|
||||
const vsCodeBinName: string = path.basename(process.execPath);
|
||||
let cmdFile: string; // Windows VS Code Insiders breaks VS Code naming conventions
|
||||
let cmdFile: string; // Windows VS Code Insiders/Exploration breaks VS Code naming conventions
|
||||
if (vsCodeBinName === 'Code - Insiders.exe') {
|
||||
cmdFile = 'code-insiders.cmd';
|
||||
} else if (vsCodeBinName === 'Code - Exploration.exe') {
|
||||
cmdFile = 'code-exploration.cmd';
|
||||
} else {
|
||||
cmdFile = 'code.cmd';
|
||||
}
|
||||
const vsCodeExeDir: string = path.dirname(process.execPath);
|
||||
return '"' + path.join(vsCodeExeDir, 'bin', cmdFile) + '"';
|
||||
return path.join(vsCodeExeDir, 'bin', cmdFile);
|
||||
} else if (platformInfo.platform === 'darwin') {
|
||||
return '"' + path.join(process.execPath, '..', '..', '..', '..', '..',
|
||||
'Resources', 'app', 'bin', 'code') + '"';
|
||||
return path.join(process.execPath, '..', '..', '..', '..', '..',
|
||||
'Resources', 'app', 'bin', 'code');
|
||||
} else {
|
||||
const vsCodeBinName: string = path.basename(process.execPath);
|
||||
try {
|
||||
@@ -260,10 +267,33 @@ async function installVsix(vsixLocation: string, updateChannel: string): Promise
|
||||
return Promise.reject(new Error('Failed to find VS Code script'));
|
||||
}
|
||||
|
||||
// Install the VSIX
|
||||
// 1.28.0 changes the CLI for making installations
|
||||
let userVersion: PackageVersion = new PackageVersion(vscode.version);
|
||||
let breakingVersion: PackageVersion = new PackageVersion('1.28.0');
|
||||
if (userVersion.isGreaterThan(breakingVersion, 'insider')) {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
let process: ChildProcess;
|
||||
try {
|
||||
process = spawn(vsCodeScriptPath, ['--install-extension', vsixLocation, '--force']);
|
||||
if (process.pid === undefined) {
|
||||
throw new Error();
|
||||
}
|
||||
} catch (error) {
|
||||
reject(new Error('Failed to launch VS Code script process for installation'));
|
||||
return;
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
let process: ChildProcess = spawn(vsCodeScriptPath, ['--install-extension', vsixLocation]);
|
||||
if (process.pid === undefined) {
|
||||
let process: ChildProcess;
|
||||
try {
|
||||
process = spawn(vsCodeScriptPath, ['--install-extension', vsixLocation]);
|
||||
if (process.pid === undefined) {
|
||||
throw new Error();
|
||||
}
|
||||
} catch (error) {
|
||||
reject(new Error('Failed to launch VS Code script process for installation'));
|
||||
return;
|
||||
}
|
||||
@@ -271,8 +301,8 @@ async function installVsix(vsixLocation: string, updateChannel: string): Promise
|
||||
// Timeout the process if no response is sent back. Ensures this Promise resolves/rejects
|
||||
const timer: NodeJS.Timer = setTimeout(() => {
|
||||
process.kill();
|
||||
reject(new Error('Failed to receive response from VS Code script process for installation within 10s.'));
|
||||
}, 10000);
|
||||
reject(new Error('Failed to receive response from VS Code script process for installation within 30s.'));
|
||||
}, 30000);
|
||||
|
||||
// If downgrading, the VS Code CLI will prompt whether the user is sure they would like to downgrade.
|
||||
// Respond to this by writing 0 to stdin (the option to override and install the VSIX package)
|
||||
@@ -296,10 +326,6 @@ async function installVsix(vsixLocation: string, updateChannel: string): Promise
|
||||
* @param updateChannel The user's updateChannel setting.
|
||||
*/
|
||||
async function checkAndApplyUpdate(updateChannel: string): Promise<void> {
|
||||
// Helper fn to avoid code duplication
|
||||
let logFailure: (error: Error) => void = (error: Error) => {
|
||||
telemetry.logLanguageServerEvent('installVsix', { 'error': error.message, 'success': 'false' });
|
||||
};
|
||||
// Wrap in new Promise to allow tmp.file callback to successfully resolve/reject
|
||||
// as tmp.file does not do anything with the callback functions return value
|
||||
const p: Promise<void> = new Promise<void>((resolve, reject) => {
|
||||
@@ -320,11 +346,33 @@ async function checkAndApplyUpdate(updateChannel: string): Promise<void> {
|
||||
// then the .catch call will return a resolved promise
|
||||
// Thusly, the .catch call must also throw, as a return would simply return an unused promise
|
||||
// instead of returning early from this function scope
|
||||
let config: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration();
|
||||
let originalProxySupport: string = config.inspect<string>('http.proxySupport').globalValue;
|
||||
while (true) { // Might need to try again with a different http.proxySupport setting.
|
||||
try {
|
||||
await util.downloadFileToDestination(buildInfo.downloadUrl, vsixPath);
|
||||
} catch {
|
||||
// Try again with the proxySupport to "off".
|
||||
if (originalProxySupport !== config.inspect<string>('http.proxySupport').globalValue) {
|
||||
config.update('http.proxySupport', originalProxySupport, true); // Reset the http.proxySupport.
|
||||
reject(new Error('Failed to download VSIX package with proxySupport off')); // Changing the proxySupport didn't help.
|
||||
return;
|
||||
}
|
||||
if (config.get('http.proxySupport') !== "off" && originalProxySupport !== "off") {
|
||||
config.update('http.proxySupport', "off", true);
|
||||
continue;
|
||||
}
|
||||
reject(new Error('Failed to download VSIX package'));
|
||||
return;
|
||||
}
|
||||
if (originalProxySupport !== config.inspect<string>('http.proxySupport').globalValue) {
|
||||
config.update('http.proxySupport', originalProxySupport, true); // Reset the http.proxySupport.
|
||||
telemetry.logLanguageServerEvent('installVsix', { 'error': "Success with proxySupport off", 'success': 'true' });
|
||||
}
|
||||
break;
|
||||
}
|
||||
try {
|
||||
await util.downloadFileToDestination(buildInfo.downloadUrl, vsixPath)
|
||||
.catch(() => { throw new Error('Failed to download VSIX package'); });
|
||||
await installVsix(vsixPath, updateChannel)
|
||||
.catch((error: Error) => { throw error; });
|
||||
await installVsix(vsixPath, updateChannel);
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
return;
|
||||
@@ -339,14 +387,15 @@ async function checkAndApplyUpdate(updateChannel: string): Promise<void> {
|
||||
});
|
||||
}, (error: Error) => {
|
||||
// Handle getTargetBuildInfo rejection
|
||||
logFailure(error);
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
await p.catch((error: Error) => {
|
||||
// Handle .then following getTargetBuildInfo rejection
|
||||
logFailure(error);
|
||||
throw error;
|
||||
if (error.message.indexOf('/') !== -1 || error.message.indexOf('\\') !== -1) {
|
||||
error.message = "Potential PII hidden";
|
||||
}
|
||||
telemetry.logLanguageServerEvent('installVsix', { 'error': error.message, 'success': 'false' });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -365,7 +414,6 @@ function registerCommands(): void {
|
||||
disposables.push(vscode.commands.registerCommand('C_Cpp.ConfigurationEdit', onEditConfiguration));
|
||||
disposables.push(vscode.commands.registerCommand('C_Cpp.AddToIncludePath', onAddToIncludePath));
|
||||
disposables.push(vscode.commands.registerCommand('C_Cpp.ToggleErrorSquiggles', onToggleSquiggles));
|
||||
disposables.push(vscode.commands.registerCommand('C_Cpp.ToggleSnippets', onToggleSnippets));
|
||||
disposables.push(vscode.commands.registerCommand('C_Cpp.ToggleIncludeFallback', onToggleIncludeFallback));
|
||||
disposables.push(vscode.commands.registerCommand('C_Cpp.ToggleDimInactiveRegions', onToggleDimInactiveRegions));
|
||||
disposables.push(vscode.commands.registerCommand('C_Cpp.ShowReleaseNotes', onShowReleaseNotes));
|
||||
@@ -512,47 +560,6 @@ function onToggleSquiggles(): void {
|
||||
settings.toggleSetting("errorSquiggles", "Enabled", "Disabled");
|
||||
}
|
||||
|
||||
function onToggleSnippets(): void {
|
||||
onActivationEvent();
|
||||
|
||||
// This will apply to all clients as it's a global toggle. It will require a reload.
|
||||
const snippetsCatName: string = "Snippets";
|
||||
let newPackageJson: any = util.getRawPackageJson();
|
||||
|
||||
if (newPackageJson.categories.findIndex(cat => cat === snippetsCatName) === -1) {
|
||||
// Add the Snippet category and snippets node.
|
||||
|
||||
newPackageJson.categories.push(snippetsCatName);
|
||||
newPackageJson.contributes.snippets = [{"language": "cpp", "path": "./cpp_snippets.json"}, {"language": "c", "path": "./cpp_snippets.json"}];
|
||||
|
||||
fs.writeFile(util.getPackageJsonPath(), util.stringifyPackageJson(newPackageJson), () => {
|
||||
showReloadPrompt("Reload Window to finish enabling C++ snippets");
|
||||
});
|
||||
|
||||
} else {
|
||||
// Remove the category and snippets node.
|
||||
let ndxCat: number = newPackageJson.categories.indexOf(snippetsCatName);
|
||||
if (ndxCat !== -1) {
|
||||
newPackageJson.categories.splice(ndxCat, 1);
|
||||
}
|
||||
|
||||
delete newPackageJson.contributes.snippets;
|
||||
|
||||
fs.writeFile(util.getPackageJsonPath(), util.stringifyPackageJson(newPackageJson), () => {
|
||||
showReloadPrompt("Reload Window to finish disabling C++ snippets");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function showReloadPrompt(msg: string): void {
|
||||
let reload: string = "Reload";
|
||||
vscode.window.showInformationMessage(msg, reload).then(value => {
|
||||
if (value === reload) {
|
||||
vscode.commands.executeCommand("workbench.action.reloadWindow");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function onToggleIncludeFallback(): void {
|
||||
onActivationEvent();
|
||||
// This only applies to the active client.
|
||||
@@ -639,29 +646,68 @@ function reportMacCrashes(): void {
|
||||
}
|
||||
}
|
||||
|
||||
function handleCrashFileRead(err: NodeJS.ErrnoException, data: string): void {
|
||||
function logCrashTelemetry(data: string): void {
|
||||
let crashObject: { [key: string]: string } = {};
|
||||
if (err) {
|
||||
crashObject["readFile: err.code"] = err.code;
|
||||
telemetry.logLanguageServerEvent("MacCrash", crashObject, null);
|
||||
return;
|
||||
}
|
||||
let startCrash: number = data.indexOf(" Crashed:");
|
||||
if (startCrash < 0) {
|
||||
startCrash = 0;
|
||||
}
|
||||
let endCrash: number = data.indexOf("Thread ", startCrash);
|
||||
if (endCrash < startCrash) {
|
||||
endCrash = data.length - 1;
|
||||
}
|
||||
data = data.substr(startCrash, endCrash - startCrash);
|
||||
if (data.length > 16384) {
|
||||
data = data.substr(0, 16384) + "...";
|
||||
}
|
||||
crashObject["CrashingThreadCallStack"] = data;
|
||||
telemetry.logLanguageServerEvent("MacCrash", crashObject, null);
|
||||
}
|
||||
|
||||
function handleCrashFileRead(err: NodeJS.ErrnoException, data: string): void {
|
||||
if (err) {
|
||||
return logCrashTelemetry("readFile: " + err.code);
|
||||
}
|
||||
|
||||
// Extract the crashing thread's call stack.
|
||||
const crashStart: string = " Crashed:";
|
||||
let startCrash: number = data.indexOf(crashStart);
|
||||
if (startCrash < 0) {
|
||||
return logCrashTelemetry("No crash start");
|
||||
}
|
||||
startCrash += crashStart.length + 1; // Skip past crashStart.
|
||||
let endCrash: number = data.indexOf("Thread ", startCrash);
|
||||
if (endCrash < 0) {
|
||||
endCrash = data.length - 1; // Not expected, but just in case.
|
||||
}
|
||||
if (endCrash <= startCrash) {
|
||||
return logCrashTelemetry("No crash end");
|
||||
}
|
||||
data = data.substr(startCrash, endCrash - startCrash);
|
||||
|
||||
// Get rid of the memory addresses (which breaks being able get a hit count for each crash call stack).
|
||||
data = data.replace(/0x................ /g, "");
|
||||
|
||||
// Get rid of the process names on each line and just add it to the start.
|
||||
const process1: string = "Microsoft.VSCode.CPP.IntelliSense.Msvc.darwin\t";
|
||||
const process2: string = "Microsoft.VSCode.CPP.Extension.darwin\t";
|
||||
if (data.includes(process1)) {
|
||||
data = data.replace(new RegExp(process1, "g"), "");
|
||||
data = process1 + "\n" + data;
|
||||
} else if (data.includes(process2)) {
|
||||
data = data.replace(new RegExp(process2, "g"), "");
|
||||
data = process2 + "\n" + data;
|
||||
} else {
|
||||
return logCrashTelemetry("No process"); // Not expected, but just in case.
|
||||
}
|
||||
|
||||
// Remove runtime lines because they can be different on different machines.
|
||||
let lines: string[] = data.split("\n");
|
||||
data = "";
|
||||
lines.forEach((line: string) => {
|
||||
if (!line.includes(".dylib") && !line.includes("???")) {
|
||||
line = line.replace(/^\d+\s+/, ""); // Remove <numbers><spaces> from the start of the line.
|
||||
line = line.replace(/std::__1::/g, "std::"); // __1:: is not helpful.
|
||||
data += (line + "\n");
|
||||
}
|
||||
});
|
||||
data = data.trimRight();
|
||||
|
||||
if (data.length > 8192) { // The API has an 8k limit.
|
||||
data = data.substr(0, 8189) + "...";
|
||||
}
|
||||
|
||||
logCrashTelemetry(data);
|
||||
}
|
||||
|
||||
export function deactivate(): Thenable<void> {
|
||||
console.log("deactivating extension");
|
||||
telemetry.logLanguageServerEvent("LanguageServerShutdown");
|
||||
|
||||
@@ -47,7 +47,7 @@ export function createProtocolFilter(me: Client, clients: ClientCollection): Mid
|
||||
}
|
||||
},
|
||||
|
||||
provideCompletionItem: invoke3,
|
||||
provideCompletionItem: invoke4,
|
||||
resolveCompletionItem: invoke2,
|
||||
provideHover: invoke3,
|
||||
provideSignatureHelp: invoke3,
|
||||
|
||||
@@ -118,6 +118,7 @@ function copyBinaryDependencies(): void {
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "Microsoft.MIDebugEngine.dll");
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "Microsoft.MIDebugEngine.dll.mdb");
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "osxlaunchhelper.scpt");
|
||||
copy(miEngineRoot, DebugAdapterBinPath, "Microsoft.VisualStudio.Debugger.Interop.15.0.dll");
|
||||
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Microsoft.VisualStudio.Debugger.Interop.10.0.dll");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Microsoft.VisualStudio.Debugger.Interop.11.0.dll");
|
||||
@@ -129,6 +130,8 @@ function copyBinaryDependencies(): void {
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "OpenDebugAD7.exe.config");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "OpenDebugAD7.exe.mdb");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Newtonsoft.Json.dll");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "WindowsDebugLauncher.exe");
|
||||
copy(openDebugRoot, DebugAdapterBinPath, "Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.dll");
|
||||
}
|
||||
|
||||
function copyMonoDependencies(): void {
|
||||
|
||||
@@ -24,7 +24,6 @@ class TemporaryCommandRegistrar {
|
||||
"C_Cpp.ToggleErrorSquiggles",
|
||||
"C_Cpp.ToggleIncludeFallback",
|
||||
"C_Cpp.ToggleDimInactiveRegions",
|
||||
"C_Cpp.ToggleSnippets",
|
||||
"C_Cpp.ShowReleaseNotes",
|
||||
"C_Cpp.ResetDatabase",
|
||||
"C_Cpp.PauseParsing",
|
||||
|
||||
+54
-5
@@ -167,8 +167,16 @@ export function getProgressExecutableSuccess(): number { return progressExecutab
|
||||
export function getProgressParseRootSuccess(): number { return progressParseRootSuccess; } // Parse root was successful (i.e. not blocked by processing taking too long).
|
||||
export function getProgressIntelliSenseNoSquiggles(): number { return progressIntelliSenseNoSquiggles; } // IntelliSense was successful and the user got no squiggles.
|
||||
|
||||
export function showReleaseNotes(): void {
|
||||
vscode.commands.executeCommand('vscode.previewHtml', vscode.Uri.file(getExtensionFilePath("ReleaseNotes.html")), vscode.ViewColumn.One, "C/C++ Extension Release Notes");
|
||||
let releaseNotesPanel: vscode.WebviewPanel = undefined;
|
||||
|
||||
export async function showReleaseNotes(): Promise<void> {
|
||||
if (releaseNotesPanel) {
|
||||
releaseNotesPanel.reveal();
|
||||
} else {
|
||||
releaseNotesPanel = vscode.window.createWebviewPanel('releaseNotes', "C/C++ Extension Release Notes", vscode.ViewColumn.One);
|
||||
releaseNotesPanel.webview.html = await readFileText(getExtensionFilePath("ReleaseNotes.html"));
|
||||
releaseNotesPanel.onDidDispose(() => releaseNotesPanel = undefined, null, extensionContext.subscriptions);
|
||||
}
|
||||
}
|
||||
|
||||
export function isUri(input: any): input is vscode.Uri {
|
||||
@@ -183,12 +191,20 @@ export function isNumber(input: any): input is number {
|
||||
return typeof(input) === "number";
|
||||
}
|
||||
|
||||
export function isBoolean(input: any): input is boolean {
|
||||
return typeof(input) === "boolean";
|
||||
}
|
||||
|
||||
export function isArray(input: any): input is any[] {
|
||||
return input instanceof Array;
|
||||
}
|
||||
|
||||
export function isOptionalString(input: any): input is string|undefined {
|
||||
return input === undefined || isString(input);
|
||||
}
|
||||
|
||||
export function isArrayOfString(input: any): input is string[] {
|
||||
return (input instanceof Array) && input.every(item => isString(item));
|
||||
return isArray(input) && input.every(item => isString(item));
|
||||
}
|
||||
|
||||
export function isOptionalArrayOfString(input: any): input is string[]|undefined {
|
||||
@@ -614,10 +630,43 @@ export function downloadFileToDestination(urlStr: string, destinationPath: strin
|
||||
// Write file using downloaded data
|
||||
let createdFile: fs.WriteStream = fs.createWriteStream(destinationPath);
|
||||
createdFile.on('finish', () => { resolve(); });
|
||||
response.on('error', (error) => { reject(); });
|
||||
response.on('error', (error) => { reject(error); });
|
||||
response.pipe(createdFile);
|
||||
});
|
||||
request.on('error', (error) => { reject(); });
|
||||
request.on('error', (error) => { reject(error); });
|
||||
request.end();
|
||||
});
|
||||
}
|
||||
|
||||
export function downloadFileToStr(urlStr: string, headers?: OutgoingHttpHeaders): Promise<any> {
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
let parsedUrl: url.Url = url.parse(urlStr);
|
||||
let request: ClientRequest = https.request({
|
||||
host: parsedUrl.host,
|
||||
path: parsedUrl.path,
|
||||
agent: getHttpsProxyAgent(),
|
||||
rejectUnauthorized: vscode.workspace.getConfiguration().get('http.proxyStrictSSL', true),
|
||||
headers: headers
|
||||
}, (response) => {
|
||||
if (response.statusCode === 301 || response.statusCode === 302) { // If redirected
|
||||
// Download from new location
|
||||
let redirectUrl: string;
|
||||
if (typeof response.headers.location === 'string') {
|
||||
redirectUrl = response.headers.location;
|
||||
} else {
|
||||
redirectUrl = response.headers.location[0];
|
||||
}
|
||||
return resolve(downloadFileToStr(redirectUrl, headers));
|
||||
}
|
||||
if (response.statusCode !== 200) { // If request is not successful
|
||||
return reject();
|
||||
}
|
||||
let downloadedData: string = '';
|
||||
response.on('data', (data) => { downloadedData += data; });
|
||||
response.on('error', (error) => { reject(error); });
|
||||
response.on('end', () => { resolve(downloadedData); });
|
||||
});
|
||||
request.on('error', (error) => { reject(error); });
|
||||
request.end();
|
||||
});
|
||||
}
|
||||
+97
-39
@@ -6,7 +6,6 @@
|
||||
|
||||
import { PackageVersion } from './packageVersion';
|
||||
import * as util from './common';
|
||||
import * as tmp from 'tmp';
|
||||
import { PlatformInformation } from './platform';
|
||||
import { OutgoingHttpHeaders } from 'http';
|
||||
|
||||
@@ -101,8 +100,10 @@ function vsixNameForPlatform(info: PlatformInformation): string {
|
||||
case 'darwin': return 'cpptools-osx.vsix';
|
||||
default: {
|
||||
switch (platformInfo.architecture) {
|
||||
case 'x86': return 'cpptools-linux32.vsix';
|
||||
case 'x86_64': return 'cpptools-linux.vsix';
|
||||
case 'x86':
|
||||
case 'i386':
|
||||
case 'i686': return 'cpptools-linux32.vsix';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,7 +130,21 @@ export interface BuildInfo {
|
||||
*/
|
||||
export async function getTargetBuildInfo(updateChannel: string): Promise<BuildInfo> {
|
||||
return getReleaseJson()
|
||||
.then(builds => getTargetBuild(builds, updateChannel))
|
||||
.then(builds => {
|
||||
if (!builds || builds.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// If the user version is greater than or incomparable to the latest available verion then there is no need to update
|
||||
// Allows testing pre-releases without accidentally downgrading to the latest version
|
||||
const userVersion: PackageVersion = new PackageVersion(util.packageJson.version);
|
||||
const latestVersion: PackageVersion = new PackageVersion(builds[0].name);
|
||||
if (userVersion.isGreaterThan(latestVersion) || (userVersion.suffix && userVersion.suffix !== 'insiders')) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return getTargetBuild(builds, userVersion, updateChannel);
|
||||
})
|
||||
.then(async build => {
|
||||
if (!build) {
|
||||
return Promise.resolve(undefined);
|
||||
@@ -148,10 +163,11 @@ export async function getTargetBuildInfo(updateChannel: string): Promise<BuildIn
|
||||
/**
|
||||
* Determines whether there exists a Build in the given Build[] that should be installed.
|
||||
* @param builds The GitHub release list parsed as an array of Builds.
|
||||
* @param userVersion The verion of the extension that the user is running.
|
||||
* @param updateChannel The user's updateChannel setting.
|
||||
* @return The Build if the user should update to it, otherwise undefined.
|
||||
*/
|
||||
function getTargetBuild(builds: Build[], updateChannel: string): Build {
|
||||
function getTargetBuild(builds: Build[], userVersion: PackageVersion, updateChannel: string): Build {
|
||||
// Get predicates to determine the build to install, if any
|
||||
let needsUpdate: (installed: PackageVersion, target: PackageVersion) => boolean;
|
||||
let useBuild: (build: Build) => boolean;
|
||||
@@ -172,52 +188,94 @@ function getTargetBuild(builds: Build[], updateChannel: string): Build {
|
||||
}
|
||||
|
||||
// Check current version against target's version to determine if the installation should happen
|
||||
const userVersion: PackageVersion = new PackageVersion(util.packageJson.version);
|
||||
const targetVersion: PackageVersion = new PackageVersion(targetBuild.name);
|
||||
return needsUpdate(userVersion, targetVersion) ? targetBuild : undefined;
|
||||
}
|
||||
|
||||
interface Rate {
|
||||
remaining: number;
|
||||
}
|
||||
|
||||
interface RateLimit {
|
||||
rate: Rate;
|
||||
}
|
||||
|
||||
function isRate(input: any): input is Rate {
|
||||
return input && input.remaining && util.isNumber(input.remaining);
|
||||
}
|
||||
|
||||
function isRateLimit(input: any): input is RateLimit {
|
||||
return input && isRate(input.rate);
|
||||
}
|
||||
|
||||
async function getRateLimit(): Promise<RateLimit> {
|
||||
const header: OutgoingHttpHeaders = { 'User-Agent': 'vscode-cpptools' };
|
||||
const data: string = await util.downloadFileToStr('https://api.github.com/rate_limit', header)
|
||||
.catch((error) => {
|
||||
if (error.code && error.code !== "ENOENT") {
|
||||
// Only throw if the user is connected to the Internet.
|
||||
throw new Error('Failed to download rate limit JSON');
|
||||
}
|
||||
});
|
||||
if (!data) {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
let rateLimit: any;
|
||||
try {
|
||||
rateLimit = JSON.parse(data);
|
||||
} catch (error) {
|
||||
throw new Error('Failed to parse rate limit JSON');
|
||||
}
|
||||
|
||||
if (isRateLimit(rateLimit)) {
|
||||
return Promise.resolve(rateLimit);
|
||||
} else {
|
||||
throw new Error('Rate limit JSON is not of type RateLimit');
|
||||
}
|
||||
}
|
||||
|
||||
async function rateLimitExceeded(): Promise<boolean> {
|
||||
const rateLimit: RateLimit = await getRateLimit();
|
||||
return rateLimit && rateLimit.rate.remaining <= 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Download and parse the release list JSON from the GitHub API into a Build[].
|
||||
* @return Information about the released builds of the C/C++ extension.
|
||||
*/
|
||||
async function getReleaseJson(): Promise<Build[]> {
|
||||
return new Promise<Build[]>((resolve, reject) => {
|
||||
// Create temp file to hold JSON
|
||||
tmp.file(async (err, releaseJsonPath, fd, cleanupCallback) => {
|
||||
if (err) {
|
||||
reject(new Error('Failed to create release json file'));
|
||||
return;
|
||||
}
|
||||
if (await rateLimitExceeded()) {
|
||||
throw new Error('Failed to stay within GitHub API rate limit');
|
||||
}
|
||||
|
||||
try {
|
||||
// Download release JSON
|
||||
const releaseUrl: string = 'https://api.github.com/repos/Microsoft/vscode-cpptools/releases';
|
||||
const header: OutgoingHttpHeaders = { 'User-Agent': 'vscode-cpptools' };
|
||||
await util.downloadFileToDestination(releaseUrl, releaseJsonPath, header)
|
||||
.catch(() => { throw new Error('Failed to download release JSON'); });
|
||||
// Download release JSON
|
||||
const releaseUrl: string = 'https://api.github.com/repos/Microsoft/vscode-cpptools/releases';
|
||||
const header: OutgoingHttpHeaders = { 'User-Agent': 'vscode-cpptools' };
|
||||
|
||||
// Read the release JSON file
|
||||
const fileContent: string = await util.readFileText(releaseJsonPath)
|
||||
.catch(() => { throw new Error('Failed to read release JSON file'); } );
|
||||
|
||||
// Parse the file
|
||||
let releaseJson: any;
|
||||
try {
|
||||
releaseJson = JSON.parse(fileContent);
|
||||
} catch (error) {
|
||||
throw new Error('Failed to parse release JSON');
|
||||
}
|
||||
|
||||
// Type check
|
||||
if (isArrayOfBuilds(releaseJson)) {
|
||||
resolve(releaseJson);
|
||||
} else {
|
||||
reject(releaseJson);
|
||||
}
|
||||
} catch (error) {
|
||||
reject(error);
|
||||
const data: string = await util.downloadFileToStr(releaseUrl, header)
|
||||
.catch((error) => {
|
||||
if (error.code && error.code !== "ENOENT") {
|
||||
// Only throw if the user is connected to the Internet.
|
||||
throw new Error('Failed to download release JSON');
|
||||
}
|
||||
});
|
||||
});
|
||||
if (!data) {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
// Parse the file
|
||||
let releaseJson: any;
|
||||
try {
|
||||
releaseJson = JSON.parse(data);
|
||||
} catch (error) {
|
||||
throw new Error('Failed to parse release JSON');
|
||||
}
|
||||
|
||||
// Type check
|
||||
if (isArrayOfBuilds(releaseJson)) {
|
||||
return releaseJson;
|
||||
} else {
|
||||
throw new Error('Release JSON is not of type Build[]');
|
||||
}
|
||||
}
|
||||
|
||||
+2
-14
@@ -16,7 +16,7 @@ import * as vscode from 'vscode';
|
||||
import { CppToolsApi, CppToolsExtension } from 'vscode-cpptools';
|
||||
import { getTemporaryCommandRegistrarInstance, initializeTemporaryCommandRegistrar } from './commands';
|
||||
import { PlatformInformation } from './platform';
|
||||
import { PackageManager, PackageManagerError, PackageManagerWebResponseError, IPackage } from './packageManager';
|
||||
import { PackageManager, PackageManagerError, IPackage } from './packageManager';
|
||||
import { PersistentState } from './LanguageServer/persistentState';
|
||||
import { getInstallationInformation, InstallationInformation, setInstallationStage } from './installationInformation';
|
||||
import { Logger, getOutputChannelLogger, showOutputChannel } from './logger';
|
||||
@@ -192,17 +192,6 @@ function handleError(error: any): void {
|
||||
let errorMessage: string;
|
||||
|
||||
if (error instanceof PackageManagerError) {
|
||||
// If this is a WebResponse error, log the IP that it resolved from the package URL
|
||||
if (error instanceof PackageManagerWebResponseError) {
|
||||
let webRequestPackageError: PackageManagerWebResponseError = error;
|
||||
if (webRequestPackageError.socket) {
|
||||
let address: any = webRequestPackageError.socket.address();
|
||||
if (address) {
|
||||
installationInformation.telemetryProperties['error.targetIP'] = address.address + ':' + address.port;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let packageError: PackageManagerError = error;
|
||||
|
||||
installationInformation.telemetryProperties['error.methodName'] = packageError.methodName;
|
||||
@@ -310,7 +299,7 @@ async function finalizeExtensionActivation(): Promise<void> {
|
||||
// (this may result in rewriting the package.json file)
|
||||
|
||||
let packageJsonPath: string = util.getExtensionFilePath("package.json");
|
||||
if (!packageJsonPath.includes(".vscode-insiders")) {
|
||||
if (!packageJsonPath.includes(".vscode-insiders") && !packageJsonPath.includes(".vscode-exploration")) {
|
||||
let abTestSettings: cpptoolsJsonUtils.ABTestSettings = cpptoolsJsonUtils.getABTestSettings();
|
||||
let packageJson: any = util.getRawPackageJson();
|
||||
let prevIntelliSenseEngineDefault: any = packageJson.contributes.configuration.properties["C_Cpp.intelliSenseEngine"].default;
|
||||
@@ -350,7 +339,6 @@ function rewriteManifest(): Promise<void> {
|
||||
"onCommand:C_Cpp.ToggleErrorSquiggles",
|
||||
"onCommand:C_Cpp.ToggleIncludeFallback",
|
||||
"onCommand:C_Cpp.ToggleDimInactiveRegions",
|
||||
"onCommand:C_Cpp.ToggleSnippets",
|
||||
"onCommand:C_Cpp.ShowReleaseNotes",
|
||||
"onCommand:C_Cpp.ResetDatabase",
|
||||
"onCommand:C_Cpp.PauseParsing",
|
||||
|
||||
@@ -26,7 +26,13 @@ export class PackageVersion {
|
||||
if (firstDigitOffset !== -1) {
|
||||
this.suffix = tokens[3].substring(0, firstDigitOffset);
|
||||
this.suffixVersion = parseInt(tokens[3].substring(firstDigitOffset));
|
||||
} else {
|
||||
this.suffix = tokens[3];
|
||||
this.suffixVersion = 1;
|
||||
}
|
||||
} else {
|
||||
this.suffix = undefined;
|
||||
this.suffixVersion = 0;
|
||||
}
|
||||
|
||||
if (this.major === undefined || this.minor === undefined || this.patch === undefined) {
|
||||
@@ -34,9 +40,8 @@ export class PackageVersion {
|
||||
}
|
||||
}
|
||||
|
||||
public isGreaterThan(other: PackageVersion): boolean {
|
||||
// PackageVersions cannot be compared if either have a suffix that is not 'insiders'
|
||||
if ((this.suffix && !this.suffix.startsWith('insiders')) || (other.suffix && !other.suffix.startsWith('insiders'))) {
|
||||
public isGreaterThan(other: PackageVersion, suffixStr: string = 'insiders'): boolean {
|
||||
if ((this.suffix && !this.suffix.startsWith(suffixStr)) || (other.suffix && !other.suffix.startsWith(suffixStr))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
import * as vscode from 'vscode';
|
||||
import * as assert from 'assert';
|
||||
|
||||
suite(`Debug Integration Test: `, function() {
|
||||
suiteSetup(async function() {
|
||||
let extension = vscode.extensions.getExtension("ms-vscode.cpptools");
|
||||
if (!extension.isActive) {
|
||||
suite(`Debug Integration Test: `, function(): void {
|
||||
suiteSetup(async function(): Promise<void> {
|
||||
let extension: vscode.Extension<any> = vscode.extensions.getExtension("ms-vscode.cpptools");
|
||||
if (!extension.isActive) {
|
||||
await extension.activate();
|
||||
}
|
||||
});
|
||||
@@ -17,14 +17,14 @@ suite(`Debug Integration Test: `, function() {
|
||||
test("Starting (gdb) Launch from the workspace root should create an Active Debug Session", async () => {
|
||||
await vscode.debug.startDebugging(vscode.workspace.workspaceFolders[0], "(gdb) Launch");
|
||||
|
||||
let debugSessionTerminated = new Promise(resolve => {
|
||||
let debugSessionTerminated: Promise<void> = new Promise(resolve => {
|
||||
vscode.debug.onDidTerminateDebugSession((e) => resolve());
|
||||
});
|
||||
|
||||
try {
|
||||
assert.equal(vscode.debug.activeDebugSession.type, "cppdbg");
|
||||
} catch (e) {
|
||||
assert.fail("Debugger failed to launch. Did the extension activate correctly?")
|
||||
assert.fail("Debugger failed to launch. Did the extension activate correctly?");
|
||||
}
|
||||
|
||||
await debugSessionTerminated;
|
||||
|
||||
+28
-10
@@ -1,16 +1,34 @@
|
||||
{
|
||||
"version": "0.1.0",
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"taskName": "build",
|
||||
"command": "g++",
|
||||
"isShellCommand": true,
|
||||
"args": ["main.cpp", "-g", "-o", "program"],
|
||||
"showOutput": "always",
|
||||
"isBuildCommand": true,
|
||||
"windows": {
|
||||
"command": "C:\\MinGW\\bin\\g++.exe"
|
||||
}
|
||||
"label": "build",
|
||||
"command": "g++",
|
||||
"type": "shell",
|
||||
"args": [
|
||||
"main.cpp",
|
||||
"-g",
|
||||
"-o",
|
||||
"program"
|
||||
],
|
||||
"group":{
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"presentation": {
|
||||
"echo": true,
|
||||
"reveal": "always",
|
||||
"focus": false,
|
||||
"panel": "shared",
|
||||
"showReuseMessage": true,
|
||||
"clear": false
|
||||
},
|
||||
"windows": {
|
||||
"command": "C:\\MinGW\\bin\\g++.exe"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,11 +5,23 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
child_process = require('child_process');
|
||||
path = require('path');
|
||||
async_child_process = require('async-child-process');
|
||||
|
||||
if (process.env.CODE_TESTS_PATH
|
||||
&& process.env.CODE_TESTS_PATH.startsWith('.')){
|
||||
process.env.CODE_TESTS_PATH = path.join(process.cwd(), process.env.CODE_TESTS_PATH.substr(2));
|
||||
}
|
||||
|
||||
require(path.resolve(__dirname, '../node_modules/vscode/bin/test'));
|
||||
let optionsWithFullEnvironment = {
|
||||
cwd: path.resolve(__dirname, '..'),
|
||||
stdio: 'inherit',
|
||||
env: {
|
||||
...process.env,
|
||||
}
|
||||
};
|
||||
|
||||
spawn = child_process.spawn('node', [path.resolve(__dirname, '../node_modules/vscode/bin/test')], optionsWithFullEnvironment);
|
||||
|
||||
return async_child_process.join(spawn);
|
||||
@@ -110,8 +110,12 @@
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"properties": {
|
||||
"name": "string",
|
||||
"value": "string"
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"CppdbgLaunchOptions": {
|
||||
@@ -259,7 +263,12 @@
|
||||
},
|
||||
"externalConsole": {
|
||||
"type": "boolean",
|
||||
"description": "If true, a console is launched for the debuggee. If false, no console is launched. Note this option is ignored in some cases for technical reasons.",
|
||||
"description": "If true, a console is launched for the debuggee. If false, on Linux and Windows, it will appear in the Integrated Console.",
|
||||
"default": false
|
||||
},
|
||||
"avoidWindowsConsoleRedirection": {
|
||||
"type": "boolean",
|
||||
"description": "If true, disables debuggee console redirection that is required for Integrated Terminal support.",
|
||||
"default": false
|
||||
},
|
||||
"sourceFileMap": {
|
||||
|
||||
@@ -2,27 +2,32 @@
|
||||
|
||||
The **launch.json** file is used to configure the debugger in Visual Studio Code.
|
||||
|
||||
Visual Studio Code generates a **launch.json** with almost all of the required information. To get started
|
||||
Visual Studio Code generates a **launch.json** with almost all of the required information. To get started
|
||||
debugging you need to fill in the `program` field with the path to the executable you plan to debug. This must be specified for
|
||||
both the launch and attach (if you plan to attach to a running instance at any point) configurations.
|
||||
|
||||
The generated file contains two sections. One that configures debugging for launch and a second that configures debugging for attach.
|
||||
The generated file contains two sections. One that configures debugging for launch and a second that configures debugging for attach.
|
||||
|
||||
# Configure VS Code's debugging behavior
|
||||
|
||||
Set or change the following options to control VS Code's behavior during debugging
|
||||
Set or change the following options to control VS Code's behavior during debugging:
|
||||
|
||||
* #### `program` (required)
|
||||
Specifies the full path to executable the debugger will launch or attach to.
|
||||
|
||||
* #### `symbolSearchPath`
|
||||
Tells the _Visual Studio Windows Debugger_ what paths to search for symbol (.pdb) files. Separate multiple paths with a semicolon. Example `"C:\\Symbols;C:\\SymbolDir2"`
|
||||
Tells the _Visual Studio Windows Debugger_ what paths to search for symbol (.pdb) files. Separate multiple paths with a semicolon. Example `"C:\\Symbols;C:\\SymbolDir2"`.
|
||||
|
||||
* #### `additionalSOLibSearchPath`
|
||||
Tells _GDB or LLDB_ what paths to search for .so files. Separate multiple paths with a semicolon. Example: `"/Users/user/dir1;/Users/user/dir2"`.
|
||||
|
||||
* #### `externalConsole`
|
||||
If set to `true`, launches an external console for the application. If `false`, no console is launched and VS Code's debugging console is used. Note this option is ignored in some cases for technical reasons.
|
||||
Windows: When set to true, it will spawn an external console. When set to false, it will use VS Code's integratedTerminal.
|
||||
Linux: When set to true, it will notify VS Code to spawn an external console. When set to false, it will use VS Code's integratedTerminal.
|
||||
macOS: When set to true, it will spawn an external console through `lldb-mi`. When set to false, the output can be seen in VS Code's debugConsole. Due to limitations within `lldb-mi`, integratedTerminal support is not available.
|
||||
|
||||
* #### `avoidWindowsConsoleRedirection`
|
||||
In order to support VSCode's Integrated terminal with gdb on Windows, the extension adds console redirection commands to the debuggee's arguments to have console input and output show up in the integrated terminal. Setting this option to `true` will disable it.
|
||||
|
||||
* #### `logging`
|
||||
Optional flags to determine what types of messages should be logged to the Debug Console.
|
||||
@@ -73,7 +78,7 @@ The following options enable you to modify the state of the target application w
|
||||
JSON array of command line arguments to pass to the program when it is launched. Example `["arg1", "arg2"]`. If you are escaping characters you will need to double escape them. For example `["{\\\"arg\\\": true}]` will send `{"arg1": true}` to your application.
|
||||
|
||||
* #### `cwd`
|
||||
Sets the the working directory of the application launched by the debugger.
|
||||
Sets the working directory of the application launched by the debugger.
|
||||
|
||||
* #### `environment`
|
||||
Environment variables to add to the environment for the program. Example: `[ { "name": "squid", "value": "clam" } ]`.
|
||||
@@ -94,10 +99,10 @@ The following options enable you to modify the state of the target application w
|
||||
|
||||
## Customizing GDB or LLDB
|
||||
|
||||
You can change the behavior of GDB or LLDB by setting the following options.
|
||||
You can change the behavior of GDB or LLDB by setting the following options:
|
||||
|
||||
* #### `MIMode`
|
||||
Indicates the debugger that VS Code will connect to. Must be set to `gdb` or `lldb`. This is pre-configured on a per-operating system basis and can be changed as needed.
|
||||
Indicates the debugger that VS Code will connect to. Must be set to `gdb` or `lldb`. This is pre-configured on a per-operating system basis and can be changed as needed.
|
||||
|
||||
* #### `miDebuggerPath`
|
||||
The path to the debugger (such as gdb). When only the executable is specified, it will search the operating system's PATH variable for a debugger (GDB on Linux and Windows, LLDB on OS X).
|
||||
@@ -152,7 +157,7 @@ The C/C++ extension enables debugging dump files on Windows and core dump files
|
||||
If you want to debug a Windows dump file, set this to the path to the dump file to start debugging in the `launch` configuration.
|
||||
|
||||
* #### `coreDumpPath`
|
||||
Full path to a core dump file to debug for the specified program. Set this to the path to the core dump file to start debugging in the `launch` configuration.
|
||||
Full path to a core dump file to debug for the specified program. Set this to the path to the core dump file to start debugging in the `launch` configuration.
|
||||
_Note: core dump debugging is not supported with MinGw._
|
||||
|
||||
## Remote debugging or debugging with a local debugger server
|
||||
@@ -164,7 +169,7 @@ _Note: core dump debugging is not supported with MinGw._
|
||||
Full path to debug server to launch.
|
||||
|
||||
* #### `debugServerArgs`
|
||||
Arguments for the the debugger server.
|
||||
Arguments for the debugger server.
|
||||
|
||||
* #### `serverStarted`
|
||||
Server-started pattern to look for in the debug server output.
|
||||
@@ -175,7 +180,7 @@ _Note: core dump debugging is not supported with MinGw._
|
||||
## Additional properties
|
||||
|
||||
* #### `processId`
|
||||
Defaults to `${command.pickProcess}` which will display a list of available processes the debugger can attach to. It is recommended to leave this default, but the property can be explicitly set to a specific process ID for the debugger to attach to.
|
||||
Defaults to `${command.pickProcess}` which will display a list of available processes the debugger can attach to. It is recommended to leave this default, but the property can be explicitly set to a specific process ID for the debugger to attach to.
|
||||
|
||||
* #### `request`
|
||||
Indicates whether the configuration section is intended to `launch` the program or `attach` to an already running instance.
|
||||
@@ -184,7 +189,7 @@ _Note: core dump debugging is not supported with MinGw._
|
||||
`Deprecated` This option is no longer needed as the target architecture is automatically detected.
|
||||
|
||||
* #### `type`
|
||||
Indicates the underlying debugger being used. Must be `cppvsdbg` when using the Visual Studio Windows debugger, and `cppdbg` when using GDB or LLDB. This is automatically set to the correct value when the
|
||||
Indicates the underlying debugger being used. Must be `cppvsdbg` when using the Visual Studio Windows debugger, and `cppdbg` when using GDB or LLDB. This is automatically set to the correct value when the
|
||||
**launch.json** file is created.
|
||||
|
||||
* #### `sourceFileMap`
|
||||
|
||||
Reference in New Issue
Block a user