Merge pull request #1922 from Microsoft/master

merge master into insiders for April insiders2
This commit is contained in:
Bob Brown
2018-05-02 22:12:14 -07:00
committed by GitHub
17 changed files with 572 additions and 138 deletions
+1 -5
View File
@@ -36,10 +36,6 @@ script:
# pr-check needs to run before test. test modifies package.json.
- npm run pr-check
- npm run test
after_failure:
- find ~ -name "integrationTests.log" -type f -exec cat {} \;
after_success:
# Dump integrationTest.log output
- find ~ -name "integrationTests.log" -type f -exec cat {} \;
+10 -8
View File
@@ -12,7 +12,7 @@ Starting with version 0.16.1, if you set the `compilerPath` property and change
"intelliSenseMode": "clang-x64",
"compilerPath": "C:/MinGW/bin/gcc.exe",
"includePath": [
"${workspaceRoot}",
"${workspaceFolder}"
],
"defines": [
"_DEBUG"
@@ -21,12 +21,14 @@ Starting with version 0.16.1, if you set the `compilerPath` property and change
"path": [
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
"C:/MinGW/include/*"
"${workspaceRoot}",
"C:/MinGW/include/*",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
},
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 3
@@ -63,8 +65,8 @@ In earlier versions of the extension, the `includePath` and a some system define
"path": [
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
"C:/MinGW/include/*"
"${workspaceRoot}",
"C:/MinGW/include/*",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
@@ -99,8 +101,8 @@ For C projects, simply remove the C++ lines:
"path": [
"C:/MinGW/lib/gcc/mingw32/6.3.0/include",
"C:/MinGW/lib/gcc/mingw32/6.3.0/include-fixed",
"C:/MinGW/include/*"
"${workspaceRoot}",
"C:/MinGW/include/*",
"${workspaceRoot}"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
+6
View File
@@ -2,15 +2,21 @@
## Version 0.17.0: May 7, 2018
* Auto-complete for headers after typing `#include`. [#802](https://github.com/Microsoft/vscode-cpptools/issues/802)
* Add support for recursive `includePath`, e.g. `${workspaceFolder}/**`. [#897](https://github.com/Microsoft/vscode-cpptools/issues/897)
* Configuration improvements. [#1338](https://github.com/Microsoft/vscode-cpptools/issues/1338)
* Potentially addresses: [#368](https://github.com/Microsoft/vscode-cpptools/issues/368), [#410](https://github.com/Microsoft/vscode-cpptools/issues/410), [#1229](https://github.com/Microsoft/vscode-cpptools/issues/1229), [#1270](https://github.com/Microsoft/vscode-cpptools/issues/), [#1404](https://github.com/Microsoft/vscode-cpptools/issues/1404)
* Add support for querying system includes/defines from WSL and Cygwin compilers. [#1845](https://github.com/Microsoft/vscode-cpptools/issues/1845), [#1736](https://github.com/Microsoft/vscode-cpptools/issues/1736)
* Fix IntelliSense for WSL projects in Windows builds 17110 and greater. [#1694](https://github.com/Microsoft/vscode-cpptools/issues/1694)
* Add snippets. [PR #1823](https://github.com/Microsoft/vscode-cpptools/pull/1823)
* Add support for vcpkg. [PR #1886](https://github.com/Microsoft/vscode-cpptools/pull/1886)
* Stop automatically adding `/usr/include` to the `includePath`. [#1819](https://github.com/Microsoft/vscode-cpptools/issues/1819)
* Fix wrong configuration being used if there are four or more. [#1599](https://github.com/Microsoft/vscode-cpptools/issues/1599)
* Fix `c_cpp_properties.json` requiring write access. [#1790](https://github.com/Microsoft/vscode-cpptools/issues/1790)
* Change file not found in `compile_commands.json` message from an error to a warning. [#1783](https://github.com/Microsoft/vscode-cpptools/issues/1783)
* Fix an IntelliSense crash during completion requests. [#1782](https://github.com/Microsoft/vscode-cpptools/issues/1782)
* Update the installed clang-format to 6.0.
* Fix bug with `compile_commands.json` when "arguments" have both a switch and a value in the arg. [#1890](https://github.com/Microsoft/vscode-cpptools/issues/1890)
* Fix bug with garbage data appearing in tooltips on Linux/Mac. [#1577](https://github.com/Microsoft/vscode-cpptools/issues/1577)
## Version 0.16.1: March 30, 2018
* Fix random deadlock caused by logging code on Linux/Mac. [#1759](https://github.com/Microsoft/vscode-cpptools/issues/1759)
+174 -49
View File
@@ -1,78 +1,203 @@
# License
MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS
MICROSOFT C/C++ EXTENSION FOR VISUAL STUDIO CODE
**MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS**
**MICROSOFT C/C++ EXTENSION FOR VISUAL STUDIO CODE**
These license terms are an agreement between Microsoft Corporation (or
based on where you live, one of its affiliates) and you. They apply to
the pre-release software named above. The terms also apply to any
Microsoft services or updates for the software, except to the extent
those have additional terms.
---
These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. They apply to the pre-release software named above. The terms also apply to any Microsoft services or updates for the software, except to the extent those have additional terms.
IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW.
---
**IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW.**
1. INSTALLATION AND USE RIGHTS. You may only use the C/C++ Extension
for Visual Studio Code with Visual Studio Code, Visual Studio or
Xamarin Studio software to help you develop and test your
applications.
1. **INSTALLATION AND USE RIGHTS.**
You may only use the C/C++ Extension for Visual Studio Code with Visual Studio Code, Visual Studio or Xamarin Studio software to help you develop and test your applications.
2. TERMS FOR SPECIFIC COMPONENTS
a. Third Party Components. The software may include third party
components with separate legal notices or governed by other
agreements, as may be described in the ThirdPartyNotices file(s)
accompanying the software.
b. Package Managers. The software may include package managers, like
Nuget, that give you the option to download other Microsoft and third
party software packages to use with your application. Those packages
are under their own licenses, and not this agreement. Microsoft does
not distribute, license or provide any warranties for any of the third
party packages.
2. **TERMS FOR SPECIFIC COMPONENTS.**
**a. Third Party components.** The software may include third party components with separate legal notices or governed by other agreements, as described in the ThirdPartyNotices file accompanying the software. Even if such components are governed by other agreements, the disclaimers and the limitations on and exclusions of damages below also apply.
**b. Package Managers.** The software may include package managers, like Nuget, that give you the option to download other Microsoft and third party software packages to use with your application. Those packages are under their own licenses, and not this agreement. Microsoft does not distribute, license or provide any warranties for any of the third party packages.
3. DATA.
a. Data Collection. The software may collect information about you and
your use of the software, and send that to Microsoft. Microsoft may
use this information to provide services and improve our products and
services. You may opt-out of many of these scenarios, but not all, as
described in the product documentation. There are also some features
in the software that may enable you and Microsoft to collect data from
users of your applications. If you use these features, you must comply
with applicable law, including providing appropriate notices to users
of your applications together with a copy of Microsofts privacy
statement. Our privacy statement is located at
https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more
about data collection and use in the help documentation and our
privacy statement. Your use of the software operates as your consent
to these practices.
b. Processing of Personal Data. To the extent Microsoft is a processor
or subprocessor of personal data in connection with the software,
Microsoft makes the commitments in the European Union General Data
Protection Regulation Terms of the Online Services Terms to all
customers effective May 25, 2018, at
http://go.microsoft.com/?linkid=9840733.
3. **DATA**. The software may collect information about you and your use of the software, and send that to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may opt-out of many of these scenarios, but not all, as described in the product documentation. There are also some features in the software that may enable you to collect data from users of your applications. If you use these features to enable data collection in your applications, you must comply with applicable law, including providing appropriate notices to users of your applications. You can learn more about data collection and use in the help documentation and the privacy statement at https://go.microsoft.com/fwlink/?LinkID=528096. Your use of the software operates as your consent to these practices.
4. PRE-RELEASE SOFTWARE. This software is a pre-release version. It
may not work the way a final version of the software will. We may
change it for the final, commercial version. We also may not release a
commercial version.
4. **PRE-RELEASE SOFTWARE**. This software is a pre-release version. It may not work the way a final version of the software will. We may change it for the final, commercial version. We also may not release a commercial version.
5. FEEDBACK. If you give feedback about the software to Microsoft, you
give to Microsoft, without charge, the right to use, share and
commercialize your feedback in any way and for any purpose. You will
not give feedback that is subject to a license that requires Microsoft
to license its software or documentation to third parties because we
include your feedback in them. These rights survive this agreement.
5. **FEEDBACK**. If you give feedback about the software to Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way and for any purpose. You will not give feedback that is subject to a license that requires Microsoft to license its software or documentation to third parties because we include your feedback in them. These rights survive this agreement.
6. SCOPE OF LICENSE. The software is licensed, not sold. This
agreement only gives you some rights to use the software. Microsoft
reserves all other rights. Unless applicable law gives you more rights
despite this limitation, you may use the software only as expressly
permitted in this agreement. In doing so, you must comply with any
technical limitations in the software that only allow you to use it in
certain ways. You may not
* work around any technical limitations in the software;
* reverse engineer, decompile or disassemble the software, or attempt
to derive the source code for the software, except and to the extent
required by third party licensing terms governing use of certain open
source components that may be included with the software;
* remove, minimize, block or modify any notices of Microsoft or its
suppliers in the software;
* use the software in any way that is against the law; or
* share, publish, rent, or lease the software, or provide the software
as a stand-alone hosted solution for others to use.
6. **SCOPE OF LICENSE**. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. For more information, see http://www.microsoftvolumelicensing.com/. You may not
* work around any technical limitations in the software;
* reverse engineer, decompile or disassemble the software, or attempt to do so, except and only to the extent required by third party licensing terms governing use of certain open-source components that may be included with the software;
* remove, minimize, block or modify any notices of Microsoft or its suppliers in the software;
* use the software in any way that is against the law; or
* share, publish, rent, or lease the software, or provide the software as a stand-alone hosted as solution for others to use.
7. EXPORT RESTRICTIONS. You must comply with all domestic and
international export laws and regulations that apply to the software,
which include restrictions on destinations, end users and end use.
For further information on export restrictions, visit
(aka.ms/exporting).
7. **EXPORT RESTRICTIONS.** You must comply with all domestic and international export laws and regulations that apply to the software, which include restrictions on destinations, end users and end use. For further information on export restrictions, visit https://aka.ms/exporting.
8. SUPPORT SERVICES. Because this software is “as is,” we may not
provide support services for it.
8. **SUPPORT SERVICES.** Because this software is “as is,” we may not provide support services for it.
9. ENTIRE AGREEMENT. This agreement, and the terms for supplements,
updates, Internet-based services and support services that you use,
are the entire agreement for the software and support services.
9. **ENTIRE AGREEMENT.** This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
10. APPLICABLE LAW. If you acquired the software in the United
States, Washington law applies to interpretation of and claims for
breach of this agreement, and the laws of the state where you live
apply to all other claims. If you acquired the software in any other
country, its laws apply.
10. **APPLICABLE LAW.** If you acquired the software in the United States, Washington law applies to interpretation of and claims for breach of this agreement, and the laws of the state where you live apply to all other claims. If you acquired the software in any other country, its laws apply.
11. CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes
certain legal rights. You may have other rights, including consumer
rights, under the laws of your state or country. Separate and apart
from your relationship with Microsoft, you may also have rights with
respect to the party from which you acquired the software. This
agreement does not change those other rights if the laws of your state
or country do not permit it to do so. For example, if you acquired the
software in one of the below regions, or mandatory country law
applies, then the following provisions apply to you:
11. **CONSUMER RIGHTS; REGIONAL VARIATIONS.** This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the software. This agreement does not change those other rights if the laws of your state or country do not permit it to do so. For example, if you acquired the software in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
a. Australia. You have statutory guarantees under the Australian
Consumer Law and nothing in this agreement is intended to affect those
rights.
**a. Australia.** You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.
b. Canada. If you acquired this software in Canada, you may stop
receiving updates by turning off the automatic update feature,
disconnecting your device from the Internet (if and when you re-
connect to the Internet, however, the software will resume checking
for and installing updates), or uninstalling the software. The product
documentation, if any, may also specify how to turn off updates for
your specific device or software.
**b. Canada.** If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the software will resume checking for and installing updates), or uninstalling the software. The product documentation, if any, may also specify how to turn off updates for your specific device or software.
c. Germany and Austria.
(i) Warranty. The properly licensed software will perform
substantially as described in any Microsoft materials that accompany
the software. However, Microsoft gives no contractual guarantee in
relation to the licensed software.
(ii) Limitation of Liability. In case of intentional conduct, gross
negligence, claims based on the Product Liability Act, as well as, in
case of death or personal or physical injury, Microsoft is liable
according to the statutory law.
Subject to the foregoing clause (ii), Microsoft will only be liable
for slight negligence if Microsoft is in breach of such material
contractual obligations, the fulfillment of which facilitate the due
performance of this agreement, the breach of which would endanger the
purpose of this agreement and the compliance with which a party may
constantly trust in (so-called "cardinal obligations"). In other cases
of slight negligence, Microsoft will not be liable for slight
negligence.
**c. Germany and Austria.**
12. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU
BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES,
GUARANTEES OR CONDITIONS. TO THE EXTENT PERMITTED UNDER YOUR LOCAL
LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
**(i)** **Warranty**. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the software. However, Microsoft gives no contractual guarantee in relation to the licensed software.
13. LIMITATION ON AND EXCLUSION OF DAMAGES. YOU CAN RECOVER FROM
MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU
CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST
PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
**(ii)** **Limitation of Liability**. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law.
This limitation applies to (a) anything related to the software,
services, content (including code) on third party Internet sites, or
third party applications; and (b) claims for breach of contract,
breach of warranty, guarantee or condition, strict liability,
negligence, or other tort to the extent permitted by applicable law.
Subject to the foregoing clause (ii), Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence.
It also applies even if Microsoft knew or should have known about the
possibility of the damages. The above limitation or exclusion may not
apply to you because your country may not allow the exclusion or
limitation of incidental, consequential or other damages.
12. **DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.**
Please note: As this software is distributed in Quebec, Canada, some
of the clauses in this agreement are provided below in French.
13. **LIMITATION ON AND EXCLUSION OF DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.**
Remarque : Ce logiciel étant distribué au Québec, Canada, certaines
des clauses dans ce contrat sont fournies ci-dessous en français.
This limitation applies to (a) anything related to the software, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert
« tel quel ». Toute utilisation de ce logiciel est à votre seule
risque et péril. Microsoft naccorde aucune autre garantie
expresse. Vous pouvez bénéficier de droits additionnels en vertu du
droit local sur la protection des consommateurs, que ce contrat ne
peut modifier. La ou elles sont permises par le droit locale, les
garanties implicites de qualité marchande, dadéquation à un
usage particulier et dabsence de contrefaçon sont exclues.
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
**Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.**
**Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.**
**EXONÉRATION DE GARANTIE.** Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft naccorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, dadéquation à un usage particulier et dabsence de contrefaçon sont exclues.
**LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES.** Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ
POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses
fournisseurs une indemnisation en cas de dommages directs uniquement
à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune
indemnisation pour les autres dommages, y compris les dommages
spéciaux, indirects ou accessoires et pertes de bénéfices.
Cette limitation concerne:
* tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et
* tout ce qui est relié au logiciel, aux services ou au contenu (y
compris le code) figurant sur des sites Internet tiers ou dans des
programmes tiers ; et
* les réclamations au titre de violation de contrat ou de garantie,
ou au titre de responsabilité stricte, de négligence ou dune
autre faute dans la limite autorisée par la loi en vigueur.
* les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou dune autre faute dans la limite autorisée par la loi en vigueur.
Elle sapplique également, même si Microsoft connaissait ou
devrait connaître l’éventualité dun tel dommage. Si votre pays
nautorise pas lexclusion ou la limitation de responsabilité
pour les dommages indirects, accessoires ou de quelque nature que ce
soit, il se peut que la limitation ou lexclusion ci-dessus ne
sappliquera pas à votre égard.
Elle sapplique également, même si Microsoft connaissait ou devrait connaître l’éventualité dun tel dommage. Si votre pays nautorise pas lexclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou lexclusion ci-dessus ne sappliquera pas à votre égard.
**EFFET JURIDIQUE.** Le présent contrat décrit certains droits juridiques. Vous pourriez avoir dautres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.
EFFET JURIDIQUE. Le présent contrat décrit certains droits
juridiques. Vous pourriez avoir dautres droits prévus par les lois
de votre pays. Le présent contrat ne modifie pas les droits que vous
confèrent les lois de votre pays si celles-ci ne le permettent pas.
+39 -33
View File
@@ -7,40 +7,41 @@ Microsoft C/C++ Extension for Visual Studio Code incorporates components from th
1. agent-base (https://github.com/TooTallNate/node-agent-base)
2. ANTLR (http://www.antlr2.org/)
3. Boost (http://www.boost.org)
4. Clang (https://clang.llvm.org/)
5. debug (https://github.com/visionmedia/debug)
6. extend (https://github.com/justmoon/node-extend)
7. fd-slicer (https://github.com/andrewrk/node-fd-slicer)
8. gcc-6/libgcc (http://packages.ubuntu.com/yakkety/main/gcc-6)
9. Guidelines Support Library (https://github.com/Microsoft/GSL)
10. http-proxy-agent (https://github.com/TooTallNate/node-http-proxy-agent)
11. https-proxy-agent (https://github.com/TooTallNate/node-https-proxy-agent)
12. jsonc-parser (https://github.com/Microsoft/node-jsonc-parser)
13. libc++ (https://libcxx.llvm.org/index.html)
14. LLDB (https://lldb.llvm.org/)
15. LLVM (http://llvm.org/)
16. MI Debug Engine (https://github.com/Microsoft/MIEngine)
17. Minimatch (https://github.com/isaacs/minimatch)
18. minimist (https://github.com/substack/minimist)
19. mkdirp (https://github.com/substack/node-mkdirp)
20. Mono (https://github.com/mono/mono)
21. ms (https://github.com/rauchg/ms.js)
22. msgpack for C/C++ (https://github.com/msgpack/msgpack-c)
23. node-http-proxy-agent (https://github.com/TooTallNate/node-https-proxy-agent)
24. node-https-proxy-agent (https://github.com/TooTallNate/node-https-proxy-agent)
25. os-tmpdir (https://github.com/sindresorhus/os-tmpdir)
26. Pend (https://github.com/andrewrk/node-pend)
27. pevents (https://github.com/neosmart/pevents)
28. RapidJSON (https://github.com/miloyip/rapidjson)
29. semver (https://github.com/npm/node-semver)
30. SQLite (https://www.sqlite.org/)
4. C++11 Sublime Text Snippets (https://github.com/Rapptz/cpp-sublime-snippet)
5. Clang (https://clang.llvm.org/)
6. debug (https://github.com/visionmedia/debug)
7. extend (https://github.com/justmoon/node-extend)
8. fd-slicer (https://github.com/andrewrk/node-fd-slicer)
9. gcc-6/libgcc (http://packages.ubuntu.com/yakkety/main/gcc-6)
10. Guidelines Support Library (https://github.com/Microsoft/GSL)
11. http-proxy-agent (https://github.com/TooTallNate/node-http-proxy-agent)
12. https-proxy-agent (https://github.com/TooTallNate/node-https-proxy-agent)
13. jsonc-parser (https://github.com/Microsoft/node-jsonc-parser)
14. libc++ (https://libcxx.llvm.org/index.html)
15. LLDB (https://lldb.llvm.org/)
16. LLVM (http://llvm.org/)
17. MI Debug Engine (https://github.com/Microsoft/MIEngine)
18. Minimatch (https://github.com/isaacs/minimatch)
19. minimist (https://github.com/substack/minimist)
20. mkdirp (https://github.com/substack/node-mkdirp)
21. Mono (https://github.com/mono/mono)
22. ms (https://github.com/rauchg/ms.js)
23. msgpack for C/C++ (https://github.com/msgpack/msgpack-c)
24. node-http-proxy-agent (https://github.com/TooTallNate/node-https-proxy-agent)
25. node-https-proxy-agent (https://github.com/TooTallNate/node-https-proxy-agent)
26. os-tmpdir (https://github.com/sindresorhus/os-tmpdir)
27. Pend (https://github.com/andrewrk/node-pend)
28. pevents (https://github.com/neosmart/pevents)
29. RapidJSON (https://github.com/miloyip/rapidjson)
30. semver (https://github.com/npm/node-semver)
31. SQLite (https://www.sqlite.org/)
Includes:functions (from fossil) (https://fossil-scm.org)
31. Tmp (https://github.com/raszi/node-tmp)
32. Tmp (https://github.com/raszi/node-tmp)
Includes:sample code (https://blog.tompawlak.org/generate-random-values-nodejs-javascript)
32. vscode-debugadapter (https://github.com/Microsoft/vscode-debugadapter-node)
33. vscode-extension-telemetry (https://github.com/Microsoft/vscode-extension-telemetry)
34. vscode-languageserver-node (https://github.com/Microsoft/vscode-languageserver-node)
35. yauzl (https://github.com/thejoshwolfe/yauzl)
33 vscode-debugadapter (https://github.com/Microsoft/vscode-debugadapter-node)
34. vscode-extension-telemetry (https://github.com/Microsoft/vscode-extension-telemetry)
35. vscode-languageserver-node (https://github.com/Microsoft/vscode-languageserver-node)
36. yauzl (https://github.com/thejoshwolfe/yauzl)
%% agent-base NOTICES AND INFORMATION BEGIN HERE
@@ -1412,6 +1413,11 @@ SOFTWARE.
=========================================
END OF yauzl NOTICES AND INFORMATION
%% C++11 Sublime Text Snippets NOTICES AND INFORMATION BEGIN HERE
=========================================
C++ Snippets for Sublime Text (https://packagecontrol.io/packages/C%2B%2B%20Snippets)
Individual snippets based on those from the C++ Snippets for Sublime Text collection are licensed under CC0 1.0 Universal
=========================================
END OF C++11 Sublime Text Snippets NOTICES AND INFORMATION
+140
View File
@@ -0,0 +1,140 @@
{
"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": "\nint 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"
}
}
+21 -13
View File
@@ -35,7 +35,8 @@
"Languages",
"Debuggers",
"Formatters",
"Linters"
"Linters",
"Snippets"
],
"activationEvents": [
"*"
@@ -421,6 +422,11 @@
"title": "Navigate...",
"category": "C/Cpp"
},
{
"command": "C_Cpp.ToggleSnippets",
"title": "Toggle Snippets",
"category": "C/Cpp"
},
{
"command": "C_Cpp.ToggleErrorSquiggles",
"title": "Toggle Error Squiggles",
@@ -436,14 +442,6 @@
"title": "Toggle Inactive Region Colorization",
"category": "C/Cpp"
},
{
"command": "workbench.action.gotoSymbol",
"title": "Go to Symbol in File..."
},
{
"command": "workbench.action.showAllSymbols",
"title": "Go to Symbol in Workspace..."
},
{
"command": "C_Cpp.ShowReleaseNotes",
"title": "Show Release Notes",
@@ -1260,7 +1258,17 @@
"[c]": {
"editor.autoIndent": false
}
}
},
"snippets": [
{
"language": "cpp",
"path": "./cpp_snippets.json"
},
{
"language": "c",
"path": "./cpp_snippets.json"
}
]
},
"scripts": {
"compile": "npm run vscode:prepublish",
@@ -1298,7 +1306,7 @@
"vscode-debugadapter": "~1.24.0",
"vscode-debugprotocol": "~1.24.0",
"vscode-extension-telemetry": "~0.0.11",
"vscode-languageclient": "~3.4.5",
"vscode-languageclient": "3.5.1",
"yauzl": "~2.8.0"
},
"runtimeDependencies": [
@@ -1459,11 +1467,11 @@
},
{
"description": "Visual Studio Windows Debugger",
"url": "https://go.microsoft.com/fwlink/?linkid=852926",
"url": "https://go.microsoft.com/fwlink/?linkid=872985",
"platforms": [
"win32"
],
"binaries": []
}
]
}
}
+20 -11
View File
@@ -117,6 +117,7 @@ const InactiveRegionNotification: NotificationType<InactiveRegionParams, void>
const maxSettingLengthForTelemetry: number = 50;
let previousCppSettings: { [key: string]: any } = {};
let failureMessageShown: boolean = false;
/**
* track settings changes for telemetry
@@ -262,7 +263,6 @@ class DefaultClient implements Client {
private outputChannel: vscode.OutputChannel;
private debugChannel: vscode.OutputChannel;
private crashTimes: number[] = [];
private failureMessageShown = new PersistentState<boolean>("DefaultClient.failureMessageShown", false);
private isSupported: boolean = true;
private inactiveRegionsDecorations = new Map<string, DecorationRangesPair>();
@@ -335,23 +335,29 @@ class DefaultClient implements Client {
// Once this is set, we don't defer any more callbacks.
this.languageClient = languageClient;
telemetry.logLanguageServerEvent("NonDefaultInitialCppSettings", getNonDefaultSettings(this.RootUri));
this.failureMessageShown.Value = false;
failureMessageShown = false;
// Listen for messages from the language server.
this.registerNotifications();
this.registerFileWatcher();
}, () => {
}, (err) => {
this.isSupported = false; // Running on an OS we don't support yet.
if (!this.failureMessageShown.Value) {
this.failureMessageShown.Value = true;
vscode.window.showErrorMessage("Unable to start the C/C++ language server. IntelliSense features will be disabled.");
if (!failureMessageShown) {
failureMessageShown = true;
vscode.window.showErrorMessage("Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: " + String(err));
}
});
} catch {
} catch (err) {
this.isSupported = false; // Running on an OS we don't support yet.
if (!this.failureMessageShown.Value) {
this.failureMessageShown.Value = true;
vscode.window.showErrorMessage("Unable to start the C/C++ language server. IntelliSense features will be disabled.");
if (!failureMessageShown) {
failureMessageShown = true;
let additionalInfo: string;
if (err.code === "EPERM") {
additionalInfo = `EPERM: Check permissions for '${getLanguageServerFileName()}'`;
} else {
additionalInfo = String(err);
}
vscode.window.showErrorMessage("Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: " + additionalInfo);
}
}
}
@@ -680,7 +686,10 @@ class DefaultClient implements Client {
if (showIntelliSenseFallbackMessage.Value) {
let learnMorePanel: string = "Learn More";
let dontShowAgain: string = "Don't Show Again";
vscode.window.showInformationMessage("Configure includePath for better IntelliSense results.", learnMorePanel, dontShowAgain).then((value) => {
let fallbackMsg: string = this.configuration.VcpkgInstalled ?
"Update your IntelliSense settings or use Vcpkg to install libraries to help find missing headers." :
"Configure your IntelliSense settings to help find missing headers.";
vscode.window.showInformationMessage(fallbackMsg, learnMorePanel, dontShowAgain).then((value) => {
switch (value) {
case learnMorePanel:
let uri: vscode.Uri = vscode.Uri.parse(`https://go.microsoft.com/fwlink/?linkid=864631`);
+45 -7
View File
@@ -80,6 +80,8 @@ export class CppProperties {
private defaultCppStandard: string = null;
private defaultIncludes: string[] = null;
private defaultFrameworks: string[] = null;
private vcpkgIncludes: string[] = [];
private vcpkgPathReady: boolean = false;
private defaultIntelliSenseMode: string = null;
private readonly configurationGlobPattern: string = "**/c_cpp_properties.json"; // TODO: probably should be a single file, not all files...
private disposables: vscode.Disposable[] = [];
@@ -124,6 +126,8 @@ export class CppProperties {
this.handleConfigurationChange();
});
this.buildVcpkgIncludePath();
this.disposables.push(vscode.Disposable.from(this.configurationsChanged, this.selectionChanged, this.compileCommandsChanged));
}
@@ -152,6 +156,10 @@ export class CppProperties {
this.handleConfigurationChange();
}
public get VcpkgInstalled(): boolean {
return this.vcpkgIncludes.length > 0;
}
private onConfigurationsChanged(): void {
this.configurationsChanged.fire(this.Configurations);
}
@@ -184,8 +192,8 @@ export class CppProperties {
this.configurationIncomplete = true;
}
private applyDefaultIncludePathsAndFrameworks(): void {
if (this.configurationIncomplete && this.defaultIncludes && this.defaultFrameworks) {
private applyDefaultIncludePathsAndFrameworks(): void {
if (this.configurationIncomplete && this.defaultIncludes && this.defaultFrameworks && this.vcpkgPathReady) {
let configuration: Configuration = this.configurationJson.configurations[this.CurrentConfiguration];
let settings: CppSettings = new CppSettings(this.rootUri);
@@ -197,15 +205,15 @@ export class CppProperties {
if (!settings.defaultIncludePath) {
// We don't add system includes to the includePath anymore. The language server has this information.
configuration.includePath = ["${workspaceFolder}"];
configuration.includePath = ["${workspaceFolder}/**"].concat(this.vcpkgIncludes);
}
if (!settings.defaultBrowsePath) {
// We don't add system includes to the includePath anymore. The language server has this information.
configuration.browse.path = ["${workspaceFolder}"].concat(this.vcpkgIncludes);
}
if (!settings.defaultDefines) {
configuration.defines = (process.platform === 'win32') ? ["_DEBUG", "UNICODE", "_UNICODE"] : [];
}
if (!settings.defaultBrowsePath) {
// We don't add system includes to the browse.path anymore. The language server has this information.
configuration.browse.path = ["${workspaceFolder}"];
}
if (!settings.defaultMacFrameworkPath && process.platform === 'darwin') {
configuration.macFrameworkPath = this.defaultFrameworks;
}
@@ -225,6 +233,36 @@ export class CppProperties {
}
}
private async buildVcpkgIncludePath(): Promise<void> {
try {
// Check for vcpkg instance and include relevent paths if found.
if (await util.checkFileExists(util.getVcpkgPathDescriptorFile())) {
let vcpkgRoot: string = await util.readFileText(util.getVcpkgPathDescriptorFile());
if (await util.checkDirectoryExists(vcpkgRoot)) {
let vcpkgInstalledPath: string = path.join(vcpkgRoot.trim(), "/installed");
let list: string[] = await util.readDir(vcpkgInstalledPath);
if (list !== undefined) {
// For every *directory* in the list (non-recursive). Each directory is basically a platform.
list.forEach((entry) => {
if (entry !== "vcpkg") {
let pathToCheck: string = path.join(vcpkgInstalledPath, entry);
if (fs.existsSync(pathToCheck)) {
let p: string = path.join(pathToCheck, "include");
if (fs.existsSync(p)) {
this.vcpkgIncludes.push(p);
}
}
}
});
}
}
}
} catch (error) {} finally {
this.vcpkgPathReady = true;
this.handleConfigurationChange();
}
}
private getConfigIndexForPlatform(config: any): number {
if (this.configurationJson.configurations.length > 3) {
return this.configurationJson.configurations.length - 1; // Default to the last custom configuration.
+42
View File
@@ -206,6 +206,7 @@ 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));
@@ -343,6 +344,47 @@ 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.
+8 -5
View File
@@ -110,12 +110,15 @@ export class UI {
public activeDocumentChanged(): void {
let activeEditor: vscode.TextEditor = vscode.window.activeTextEditor;
let show: boolean = (activeEditor && (activeEditor.document.languageId === "cpp" || activeEditor.document.languageId === "c"));
let isCpp: boolean = (activeEditor && (activeEditor.document.languageId === "cpp" || activeEditor.document.languageId === "c"));
this.ShowConfiguration = show;
this.ShowDBIcon = show;
this.ShowFlameIcon = show;
this.ShowNavigation = show;
// It's sometimes desirable to see the config and icons when making settings changes.
let isSettingsJson: boolean = (activeEditor && (activeEditor.document.fileName.endsWith("c_cpp_properties.json") || activeEditor.document.fileName.endsWith("settings.json")));
this.ShowConfiguration = isCpp || isSettingsJson;
this.ShowDBIcon = isCpp || isSettingsJson;
this.ShowFlameIcon = isCpp || isSettingsJson;
this.ShowNavigation = isCpp;
}
public bind(client: Client): void {
+1
View File
@@ -22,6 +22,7 @@ class TemporaryCommandRegistrar {
"C_Cpp.ToggleErrorSquiggles",
"C_Cpp.ToggleIncludeFallback",
"C_Cpp.ToggleDimInactiveRegions",
"C_Cpp.ToggleSnippets",
"C_Cpp.ShowReleaseNotes",
"C_Cpp.ResetDatabase",
"C_Cpp.PauseParsing",
+30
View File
@@ -49,6 +49,14 @@ export function getPackageJsonPath(): string {
return getExtensionFilePath("package.json");
}
export function getVcpkgPathDescriptorFile(): string {
if (process.platform === 'win32') {
return path.join(process.env.LOCALAPPDATA, "vcpkg/vcpkg.path.txt");
} else {
return path.join(process.env.HOME, ".vcpkg/vcpkg.path.txt");
}
}
// Extension is ready if install.lock exists and debugAdapters folder exist.
export async function isExtensionReady(): Promise<boolean> {
const doesInstallLockFileExist: boolean = await checkInstallLockFile();
@@ -266,6 +274,28 @@ export function checkFileExists(filePath: string): Promise<boolean> {
});
}
/** Test whether a directory exists */
export function checkDirectoryExists(dirPath: string): Promise<boolean> {
return new Promise((resolve, reject) => {
fs.stat(dirPath, (err, stats) => {
if (stats && stats.isDirectory()) {
resolve(true);
} else {
resolve(false);
}
});
});
}
/** Read the files in a directory */
export function readDir(dirPath: string): Promise<string[]> {
return new Promise((resolve) => {
fs.readdir(dirPath, (err, list) => {
resolve(list);
});
});
}
/** Test whether the lock file exists.*/
export function checkInstallLockFile(): Promise<boolean> {
return checkFileExists(getInstallLockPath());
+1
View File
@@ -307,6 +307,7 @@ 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",
@@ -20,8 +20,12 @@ suite(`Debug Integration Test: `, function() {
let debugSessionTerminated = new Promise(resolve => {
vscode.debug.onDidTerminateDebugSession((e) => resolve());
});
assert.equal(vscode.debug.activeDebugSession.type, "cppdbg");
try {
assert.equal(vscode.debug.activeDebugSession.type, "cppdbg");
} catch (e) {
assert.fail("Debugger failed to launch. Did the extension activate correctly?")
}
await debugSessionTerminated;
});
+7
View File
@@ -1,4 +1,10 @@
<!--
If this is a performance issue report, please use the VS Code Issue reporter via command palette (f1 -> Help: Report Issue).
Set the field 'This is a' to be 'Performance Issue', the field 'File on' to be 'An Extension', and set 'Extension' to be 'C/C++'.
You may toggle off the data you wish to not send, but with more information we can help.
Fill out the title and steps to reproduce with as much info as you can.
Clicking on 'Preview on GitHub' will open up a webpage for you to submit your issue.
If this is a bug report, please give us as much information as possible so we can reproduce your issue.
Examples of information that can help us find and fix bugs:
* Operating System and version
@@ -9,6 +15,7 @@
* A small code sample, zipped up project, or open source repo we can use to verify the bug
* Relevant settings from your settings.json, c_cpp_properties.json, and/or launch.json files
* Any log messages present in the Output window (use "C_Cpp.loggingLevel": "Information" in settings.json)
* Debugger logs (use "logging": { "engineLogging": true } in your launch.json)
Please also take a look at our documentation, as we may already have answers for your questions:
* https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation
+21 -5
View File
@@ -1,15 +1,31 @@
# vscode-cpptools
This is the official repository for filing issues against and getting support for the [Microsoft C/C++ extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).
This is the official repository for the [Microsoft C/C++ extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).
The `vscode-cpptools` repository is where we do development and there are many ways you can support the extension, for example:
* [Report issues or request features](https://github.com/Microsoft/vscode-cpptools/issues)
- If someone has filed a similar issue, please provide any additional information that can help us resolve it on the issue
- If someone has filed a similar feature request, please leave a thumbs up reaction on the issue
- [List of popular feature requests](https://github.com/Microsoft/vscode-cpptools/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3A%22Feature+Request%22)
* [Contribute to the extension](Extension)
## Getting Started
You can learn how to use the extension at [VS Code for C/C++](https://code.visualstudio.com/docs/languages/cpp).
If you clone this repository, you can also try out our [Code Samples](Code%20Samples).
If you have any questions, check out our our [**Documentation**](Documentation) folder. If you do not find your answer there, feel free to ask it in our [issues page](https://github.com/Microsoft/vscode-cpptools/issues).
### Contribution
Contributions are always welcome. Please see our [contributing guide](CONTRIBUTING.md) for more details.
### Microsoft Open Source Code of Conduct
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact opencode@microsoft.com with any additional questions or comments.
### Documentation
The documentation has been moved to the [**Documentation**](Documentation) folder. If you would like to contribute, please create a Markdown file and submit a pull request.
### Data/Telemetry
This project collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://privacy.microsoft.com/en-us/privacystatement) to learn more.