Compare commits
45
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5077edf585 | ||
|
|
3f1e851152 | ||
|
|
6b1fe63294 | ||
|
|
821fbb3566 | ||
|
|
3670564712 | ||
|
|
f38926f8b1 | ||
|
|
ced402ad5d | ||
|
|
5f8d072b86 | ||
|
|
f84f285db3 | ||
|
|
44194c000d | ||
|
|
c61bd07bb5 | ||
|
|
3df0a0f796 | ||
|
|
f16dfc92b2 | ||
|
|
96faf18d96 | ||
|
|
6393210a31 | ||
|
|
7151847d1f | ||
|
|
d5ffbd86f3 | ||
|
|
30de9bcc27 | ||
|
|
100e2e0828 | ||
|
|
e3b41771c6 | ||
|
|
3f7f3090f6 | ||
|
|
4149493f2c | ||
|
|
43aad3f65c | ||
|
|
bedcacb0a1 | ||
|
|
a5f8f84b43 | ||
|
|
e53b190380 | ||
|
|
1846fd4001 | ||
|
|
62e09945e3 | ||
|
|
c9b0db02fd | ||
|
|
51da619eec | ||
|
|
3eb50568e9 | ||
|
|
866b145645 | ||
|
|
9762fe5397 | ||
|
|
377896c30a | ||
|
|
98f13a6f11 | ||
|
|
0d85aea687 | ||
|
|
25d2b76514 | ||
|
|
42dfef3f6b | ||
|
|
1ce1e9cd71 | ||
|
|
65163966d5 | ||
|
|
edf8e0a155 | ||
|
|
4083075476 | ||
|
|
b745ebc218 | ||
|
|
b69d17a0f5 | ||
|
|
be8b6fb693 |
Generated
+3
-3
@@ -3915,9 +3915,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.1",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz",
|
||||
"integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==",
|
||||
"version": "1.15.4",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz",
|
||||
"integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -11,6 +11,8 @@ on:
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
|
||||
Vendored
+2
-2
@@ -41,8 +41,8 @@
|
||||
"editor.formatOnSave": true,
|
||||
"files.insertFinalNewline": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true,
|
||||
"source.organizeImports": true
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.organizeImports": "explicit"
|
||||
},
|
||||
},
|
||||
"eslint.format.enable": true,
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
# C/C++ for Visual Studio Code Changelog
|
||||
|
||||
## Version 1.19.2: January 22, 2024
|
||||
### Enhancements
|
||||
* Implement progressive population of IntelliSense results. [#7759](https://github.com/microsoft/vscode-cpptools/issues/7759)
|
||||
* Improve memory efficiency by using token parsing in the 'Add #include' feature. [#11515](https://github.com/microsoft/vscode-cpptools/issues/11515)
|
||||
* Improve the types supported for the 'Add #include' code action.
|
||||
* Various performance improvements.
|
||||
|
||||
### Bug Fixes
|
||||
* Fix shell escaping for `cppbuild` task command line arguments. [#11422](https://github.com/microsoft/vscode-cpptools/issues/11422)
|
||||
* Fix IntelliSense not updating when a `#include` is added from a refactor command. [#11549](https://github.com/microsoft/vscode-cpptools/issues/11549)
|
||||
* Fix formatting not working in headers after using 'Extract to Function'. [#11729](https://github.com/microsoft/vscode-cpptools/issues/11729)
|
||||
* Fix document symbol requests not checking for cancellation. [#11750](https://github.com/microsoft/vscode-cpptools/issues/11750)
|
||||
* Fix code analysis results getting cleared after there's a configuration update. [#11790](https://github.com/microsoft/vscode-cpptools/issues/11790)
|
||||
* Fix an exception getting thrown if IntelliSense is disabled but a configuration provider is registered. [#11795](https://github.com/microsoft/vscode-cpptools/issues/11795)
|
||||
* Fix German code analysis translations. [PR #11845](https://github.com/microsoft/vscode-cpptools/pull/11845)
|
||||
* Thank you for the contribution [@Sir2B (Tobias Obermayer)](https://github.com/Sir2B)
|
||||
* Fix an EACCES error when using include wildcards with system includes. [#11833](https://github.com/microsoft/vscode-cpptools/issues/11833)
|
||||
* Fix IntelliSense passes occurring while a user is typing, not honoring the `C_Cpp.intelliSenseUpdateDelay` setting.
|
||||
* Fix a call hierarchy bug leading to use of header-only TU's unnecessarily.
|
||||
* Fix a bug that could lead to missing TU source file candidates.
|
||||
* Fix a "random" IntelliSense crash during completion.
|
||||
* Fix a crash if access to `/dev/urandom` is restricted.
|
||||
* Lots of other minor fixes.
|
||||
|
||||
## Version 1.19.1: November 21, 2023
|
||||
### Bug Fixes
|
||||
* Fix `Add '#include'` code actions for Mac frameworks. [#11579](https://github.com/microsoft/vscode-cpptools/issues/11579)
|
||||
|
||||
@@ -1172,6 +1172,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
array-timsort 1.0.3 - MIT
|
||||
https://github.com/kaelzhang/node-array-timsort
|
||||
|
||||
Copyright (c) 2015 Marco Ziccardi
|
||||
|
||||
The MIT License
|
||||
|
||||
@@ -1788,7 +1789,7 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
follow-redirects 1.15.3 - MIT
|
||||
follow-redirects 1.15.4 - MIT
|
||||
https://github.com/follow-redirects/follow-redirects
|
||||
|
||||
Copyright 2014-present Olivier Lalonde <[email protected]> , James Talmage <[email protected]> , Ruben Verborgh
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"c_cpp.command.toggleDimInactiveRegions.title": "Farbgebung für inaktive Regionen umschalten",
|
||||
"c_cpp.command.resetDatabase.title": "IntelliSense-Datenbank zurücksetzen",
|
||||
"c_cpp.command.takeSurvey.title": "An Umfrage teilnehmen",
|
||||
"c_cpp.command.restartIntelliSenseForFile.title": "IntelliSense für Active File neu starten",
|
||||
"c_cpp.command.restartIntelliSenseForFile.title": "IntelliSense für \"Aktive Datei\" neu starten",
|
||||
"c_cpp.command.logDiagnostics.title": "Diagnose protokollieren",
|
||||
"c_cpp.command.referencesViewGroupByType.title": "Nach Verweistyp gruppieren",
|
||||
"c_cpp.command.referencesViewUngroupByType.title": "Gruppierung nach Verweistyp aufheben",
|
||||
@@ -37,10 +37,10 @@
|
||||
"c_cpp.command.GoToNextDirectiveInGroup.title": "Zur nächsten Präprozessoranweisung in bedingter Gruppe wechseln",
|
||||
"c_cpp.command.GoToPrevDirectiveInGroup.title": "Zur vorherigen Präprozessoranweisung in bedingter Gruppe wechseln",
|
||||
"c_cpp.command.CreateDeclarationOrDefinition.title": "Deklaration/Definition erstellen",
|
||||
"c_cpp.command.RunCodeAnalysisOnActiveFile.title": "Code Analysis auf \"Aktive Dateien\" ausführen",
|
||||
"c_cpp.command.RunCodeAnalysisOnOpenFiles.title": "Code Analysis auf \"Dateien öffnen\" ausführen",
|
||||
"c_cpp.command.RunCodeAnalysisOnAllFiles.title": "Code Analysis auf \"Alle Dateien\" ausführen",
|
||||
"c_cpp.command.RemoveAllCodeAnalysisProblems.title": "Alle Code Analysis Probleme löschen",
|
||||
"c_cpp.command.RunCodeAnalysisOnActiveFile.title": "Code Analyse auf \"Aktive Datei\" ausführen",
|
||||
"c_cpp.command.RunCodeAnalysisOnOpenFiles.title": "Code Analyse auf \"Offene Dateien\" ausführen",
|
||||
"c_cpp.command.RunCodeAnalysisOnAllFiles.title": "Code Analyse auf \"Alle Dateien\" ausführen",
|
||||
"c_cpp.command.RemoveAllCodeAnalysisProblems.title": "Alle Code Analyse Probleme löschen",
|
||||
"c_cpp.command.BuildAndDebugFile.title": "C/C++-Datei debuggen",
|
||||
"c_cpp.command.BuildAndRunFile.title": "C/C++-Datei ausführen",
|
||||
"c_cpp.command.AddDebugConfiguration.title": "Debugkonfiguration hinzufügen",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "cpptools",
|
||||
"displayName": "C/C++",
|
||||
"description": "C/C++ IntelliSense, debugging, and code browsing.",
|
||||
"version": "1.19.1-main",
|
||||
"version": "1.19.2-main",
|
||||
"publisher": "ms-vscode",
|
||||
"icon": "LanguageCCPP_color_128x.png",
|
||||
"readme": "README.md",
|
||||
@@ -5811,17 +5811,17 @@
|
||||
},
|
||||
"configurationDefaults": {
|
||||
"[cpp]": {
|
||||
"editor.wordBasedSuggestions": false,
|
||||
"editor.wordBasedSuggestions": "off",
|
||||
"editor.suggest.insertMode": "replace",
|
||||
"editor.semanticHighlighting.enabled": true
|
||||
},
|
||||
"[cuda-cpp]": {
|
||||
"editor.wordBasedSuggestions": false,
|
||||
"editor.wordBasedSuggestions": "off",
|
||||
"editor.suggest.insertMode": "replace",
|
||||
"editor.semanticHighlighting.enabled": true
|
||||
},
|
||||
"[c]": {
|
||||
"editor.wordBasedSuggestions": false,
|
||||
"editor.wordBasedSuggestions": "off",
|
||||
"editor.suggest.insertMode": "replace",
|
||||
"editor.semanticHighlighting.enabled": true
|
||||
}
|
||||
|
||||
@@ -470,9 +470,9 @@
|
||||
]
|
||||
},
|
||||
"c_cpp.configuration.autocomplete.markdownDescription": {
|
||||
"message": "Controls the auto-completion provider. If `disabled` and you want word-based completion, you will also need to set `\"[cpp]\": {\"editor.wordBasedSuggestions\": true}` (and similarly for `c` and `cuda-cpp` languages).",
|
||||
"message": "Controls the auto-completion provider. If `disabled` and you want word-based completion, you will also need to set `\"[cpp]\": {\"editor.wordBasedSuggestions\": <value>}` (and similarly for `c` and `cuda-cpp` languages).",
|
||||
"comment": [
|
||||
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
|
||||
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered -- except for text \"value\", which is a placeholder that should be translated."
|
||||
]
|
||||
},
|
||||
"c_cpp.configuration.autocomplete.default.description": "Uses the active IntelliSense engine.",
|
||||
|
||||
@@ -1162,16 +1162,16 @@ abstract class DefaultConfigurationProvider implements IConfigurationAssetProvid
|
||||
|
||||
class WindowsConfigurationProvider extends DefaultConfigurationProvider {
|
||||
private executable: string = "a.exe";
|
||||
private pipeProgram: string = "<" + localize("path.to.pipe.program", "full path to pipe program such as {0}", "plink.exe").replace(/\"/g, "\\\"") + ">";
|
||||
private pipeProgram: string = "<" + localize("path.to.pipe.program", "full path to pipe program such as {0}", "plink.exe").replace(/"/g, '\\"') + ">";
|
||||
private MIMode: string = 'gdb';
|
||||
private setupCommandsBlock: string = `"setupCommands": [
|
||||
{
|
||||
"description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/\"/g, "\\\"")}",
|
||||
"description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/"/g, '\\"')}",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "${localize("enable.intel.disassembly.flavor", "Set Disassembly Flavor to {0}", "Intel").replace(/\"/g, "\\\"")}",
|
||||
"description": "${localize("enable.intel.disassembly.flavor", "Set Disassembly Flavor to {0}", "Intel").replace(/"/g, '\\"')}",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
@@ -1205,12 +1205,12 @@ class LinuxConfigurationProvider extends DefaultConfigurationProvider {
|
||||
private MIMode: string = 'gdb';
|
||||
private setupCommandsBlock: string = `"setupCommands": [
|
||||
{
|
||||
"description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/\"/g, "\\\"")}",
|
||||
"description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/"/g, '\\"')}",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "${localize("enable.intel.disassembly.flavor", "Set Disassembly Flavor to {0}", "Intel").replace(/\"/g, "\\\"")}",
|
||||
"description": "${localize("enable.intel.disassembly.flavor", "Set Disassembly Flavor to {0}", "Intel").replace(/"/g, '\\"')}",
|
||||
"text": "-gdb-set disassembly-flavor intel",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ function createLaunchString(name: string, type: string, executable: string): str
|
||||
return `"name": "${name}",
|
||||
"type": "${type}",
|
||||
"request": "launch",
|
||||
"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/\"/g, "\\\"")}",
|
||||
"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/"/g, '\\"')}",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "$\{fileDirname\}",
|
||||
@@ -106,7 +106,7 @@ function createAttachString(name: string, type: string, executable: string): str
|
||||
"name": "${name}",
|
||||
"type": "${type}",
|
||||
"request": "attach",{0}
|
||||
`, [type === "cppdbg" ? `${os.EOL}"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/\"/g, "\\\"")}",` : ""]);
|
||||
`, [type === "cppdbg" ? `${os.EOL}"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/"/g, '\\"')}",` : ""]);
|
||||
}
|
||||
|
||||
function createRemoteAttachString(name: string, type: string, executable: string): string {
|
||||
@@ -114,7 +114,7 @@ function createRemoteAttachString(name: string, type: string, executable: string
|
||||
"name": "${name}",
|
||||
"type": "${type}",
|
||||
"request": "attach",
|
||||
"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/\"/g, "\\\"")}",
|
||||
"program": "${localize("enter.program.name", "enter program name, for example {0}", "$\{workspaceFolder\}" + "/" + executable).replace(/"/g, '\\"')}",
|
||||
"processId": "$\{command:pickRemoteProcess\}"
|
||||
`;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ abstract class Configuration implements IConfiguration {
|
||||
export class MIConfigurations extends Configuration {
|
||||
|
||||
public GetLaunchConfiguration(): IConfigurationSnippet {
|
||||
const name: string = `(${this.MIMode}) ${localize("launch.string", "Launch").replace(/\"/g, "\\\"")}`;
|
||||
const name: string = `(${this.MIMode}) ${localize("launch.string", "Launch").replace(/"/g, '\\"')}`;
|
||||
|
||||
const body: string = formatString(`{
|
||||
\t${indentJsonString(createLaunchString(name, this.miDebugger, this.executable))},
|
||||
@@ -168,7 +168,7 @@ export class MIConfigurations extends Configuration {
|
||||
|
||||
return {
|
||||
"label": configPrefix + name,
|
||||
"description": localize("launch.with", "Launch with {0}.", this.MIMode).replace(/\"/g, "\\\""),
|
||||
"description": localize("launch.with", "Launch with {0}.", this.MIMode).replace(/"/g, '\\"'),
|
||||
"bodyText": body.trim(),
|
||||
"isInitialConfiguration": true,
|
||||
"debuggerType": DebuggerType.cppdbg
|
||||
@@ -176,7 +176,7 @@ export class MIConfigurations extends Configuration {
|
||||
}
|
||||
|
||||
public GetAttachConfiguration(): IConfigurationSnippet {
|
||||
const name: string = `(${this.MIMode}) ${localize("attach.string", "Attach").replace(/\"/g, "\\\"")}`;
|
||||
const name: string = `(${this.MIMode}) ${localize("attach.string", "Attach").replace(/"/g, '\\"')}`;
|
||||
|
||||
const body: string = formatString(`{
|
||||
\t${indentJsonString(createAttachString(name, this.miDebugger, this.executable))}
|
||||
@@ -186,7 +186,7 @@ export class MIConfigurations extends Configuration {
|
||||
|
||||
return {
|
||||
"label": configPrefix + name,
|
||||
"description": localize("attach.with", "Attach with {0}.", this.MIMode).replace(/\"/g, "\\\""),
|
||||
"description": localize("attach.with", "Attach with {0}.", this.MIMode).replace(/"/g, '\\"'),
|
||||
"bodyText": body.trim(),
|
||||
"debuggerType": DebuggerType.cppdbg
|
||||
};
|
||||
@@ -197,7 +197,7 @@ export class MIConfigurations extends Configuration {
|
||||
export class PipeTransportConfigurations extends Configuration {
|
||||
|
||||
public GetLaunchConfiguration(): IConfigurationSnippet {
|
||||
const name: string = `(${this.MIMode}) ${localize("pipe.launch", "Pipe Launch").replace(/\"/g, "\\\"")}`;
|
||||
const name: string = `(${this.MIMode}) ${localize("pipe.launch", "Pipe Launch").replace(/"/g, '\\"')}`;
|
||||
|
||||
const body: string = formatString(`
|
||||
{
|
||||
@@ -208,7 +208,7 @@ export class PipeTransportConfigurations extends Configuration {
|
||||
|
||||
return {
|
||||
"label": configPrefix + name,
|
||||
"description": localize("pipe.launch.with", "Pipe Launch with {0}.", this.MIMode).replace(/\"/g, "\\\""),
|
||||
"description": localize("pipe.launch.with", "Pipe Launch with {0}.", this.MIMode).replace(/"/g, '\\"'),
|
||||
"bodyText": body.trim(),
|
||||
"debuggerType": DebuggerType.cppdbg
|
||||
};
|
||||
@@ -216,7 +216,7 @@ export class PipeTransportConfigurations extends Configuration {
|
||||
}
|
||||
|
||||
public GetAttachConfiguration(): IConfigurationSnippet {
|
||||
const name: string = `(${this.MIMode}) ${localize("pipe.attach", "Pipe Attach").replace(/\"/g, "\\\"")}`;
|
||||
const name: string = `(${this.MIMode}) ${localize("pipe.attach", "Pipe Attach").replace(/"/g, '\\"')}`;
|
||||
|
||||
const body: string = formatString(`
|
||||
{
|
||||
@@ -226,7 +226,7 @@ export class PipeTransportConfigurations extends Configuration {
|
||||
}`, [this.additionalProperties ? `,${os.EOL}\t${indentJsonString(this.additionalProperties)}` : ""]);
|
||||
return {
|
||||
"label": configPrefix + name,
|
||||
"description": localize("pipe.attach.with", "Pipe Attach with {0}.", this.MIMode).replace(/\"/g, "\\\""),
|
||||
"description": localize("pipe.attach.with", "Pipe Attach with {0}.", this.MIMode).replace(/"/g, '\\"'),
|
||||
"bodyText": body.trim(),
|
||||
"debuggerType": DebuggerType.cppdbg
|
||||
};
|
||||
@@ -237,7 +237,7 @@ export class PipeTransportConfigurations extends Configuration {
|
||||
export class WindowsConfigurations extends Configuration {
|
||||
|
||||
public GetLaunchConfiguration(): IConfigurationSnippet {
|
||||
const name: string = `(Windows) ${localize("launch.string", "Launch").replace(/\"/g, "\\\"")}`;
|
||||
const name: string = `(Windows) ${localize("launch.string", "Launch").replace(/"/g, '\\"')}`;
|
||||
|
||||
const body: string = `
|
||||
{
|
||||
@@ -246,7 +246,7 @@ export class WindowsConfigurations extends Configuration {
|
||||
|
||||
return {
|
||||
"label": configPrefix + name,
|
||||
"description": localize("launch.with.vs.debugger", "Launch with the Visual Studio C/C++ debugger.").replace(/\"/g, "\\\""),
|
||||
"description": localize("launch.with.vs.debugger", "Launch with the Visual Studio C/C++ debugger.").replace(/"/g, '\\"'),
|
||||
"bodyText": body.trim(),
|
||||
"isInitialConfiguration": true,
|
||||
"debuggerType": DebuggerType.cppvsdbg
|
||||
@@ -255,7 +255,7 @@ export class WindowsConfigurations extends Configuration {
|
||||
}
|
||||
|
||||
public GetAttachConfiguration(): IConfigurationSnippet {
|
||||
const name: string = `(Windows) ${localize("attach.string", "Attach").replace(/\"/g, "\\\"")}`;
|
||||
const name: string = `(Windows) ${localize("attach.string", "Attach").replace(/"/g, '\\"')}`;
|
||||
|
||||
const body: string = `
|
||||
{
|
||||
@@ -264,7 +264,7 @@ export class WindowsConfigurations extends Configuration {
|
||||
|
||||
return {
|
||||
"label": configPrefix + name,
|
||||
"description": localize("attach.with.vs.debugger", "Attach to a process with the Visual Studio C/C++ debugger.").replace(/\"/g, "\\\""),
|
||||
"description": localize("attach.with.vs.debugger", "Attach to a process with the Visual Studio C/C++ debugger.").replace(/"/g, '\\"'),
|
||||
"bodyText": body.trim(),
|
||||
"debuggerType": DebuggerType.cppvsdbg
|
||||
};
|
||||
@@ -277,7 +277,7 @@ export class WSLConfigurations extends Configuration {
|
||||
public bashPipeProgram = process.arch === 'ia32' ? "${env:windir}\\\\sysnative\\\\bash.exe" : "${env:windir}\\\\system32\\\\bash.exe";
|
||||
|
||||
public GetLaunchConfiguration(): IConfigurationSnippet {
|
||||
const name: string = `(${this.MIMode}) ${localize("bash.on.windows.launch", "Bash on Windows Launch").replace(/\"/g, "\\\"")}`;
|
||||
const name: string = `(${this.MIMode}) ${localize("bash.on.windows.launch", "Bash on Windows Launch").replace(/"/g, '\\"')}`;
|
||||
|
||||
const body: string = formatString(`
|
||||
{
|
||||
@@ -287,14 +287,14 @@ export class WSLConfigurations extends Configuration {
|
||||
|
||||
return {
|
||||
"label": configPrefix + name,
|
||||
"description": localize("launch.bash.windows", "Launch in Bash on Windows using {0}.", this.MIMode).replace(/\"/g, "\\\""),
|
||||
"description": localize("launch.bash.windows", "Launch in Bash on Windows using {0}.", this.MIMode).replace(/"/g, '\\"'),
|
||||
"bodyText": body.trim(),
|
||||
"debuggerType": DebuggerType.cppdbg
|
||||
};
|
||||
}
|
||||
|
||||
public GetAttachConfiguration(): IConfigurationSnippet {
|
||||
const name: string = `(${this.MIMode}) ${localize("bash.on.windows.attach", "Bash on Windows Attach").replace(/\"/g, "\\\"")}`;
|
||||
const name: string = `(${this.MIMode}) ${localize("bash.on.windows.attach", "Bash on Windows Attach").replace(/"/g, '\\"')}`;
|
||||
|
||||
const body: string = formatString(`
|
||||
{
|
||||
@@ -304,7 +304,7 @@ export class WSLConfigurations extends Configuration {
|
||||
|
||||
return {
|
||||
"label": configPrefix + name,
|
||||
"description": localize("remote.attach.bash.windows", "Attach to a remote process running in Bash on Windows using {0}.", this.MIMode).replace(/\"/g, "\\\""),
|
||||
"description": localize("remote.attach.bash.windows", "Attach to a remote process running in Bash on Windows using {0}.", this.MIMode).replace(/"/g, '\\"'),
|
||||
"bodyText": body.trim(),
|
||||
"debuggerType": DebuggerType.cppdbg
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ export class ArchitectureReplacer {
|
||||
public static checkAndReplaceWSLPipeProgram(pipeProgramStr: string, expectedArch: ArchType): string | undefined {
|
||||
let replacedPipeProgram: string | undefined;
|
||||
const winDir: string | undefined = process.env.WINDIR ? process.env.WINDIR.toLowerCase() : undefined;
|
||||
const winDirAltDirSep: string | undefined = process.env.WINDIR ? process.env.WINDIR.replace('\\', '/').toLowerCase() : undefined;
|
||||
const winDirAltDirSep: string | undefined = process.env.WINDIR ? process.env.WINDIR.replace(/\\/g, '/').toLowerCase() : undefined;
|
||||
const winDirEnv: string = "${env:windir}";
|
||||
|
||||
if (winDir && winDirAltDirSep && (pipeProgramStr.indexOf(winDir) === 0 || pipeProgramStr.indexOf(winDirAltDirSep) === 0 || pipeProgramStr.indexOf(winDirEnv) === 0)) {
|
||||
|
||||
@@ -53,7 +53,7 @@ import {
|
||||
import { Location, TextEdit, WorkspaceEdit } from './commonTypes';
|
||||
import * as configs from './configurations';
|
||||
import { DataBinding } from './dataBinding';
|
||||
import { CppSourceStr, clients, configPrefix, updateLanguageConfigurations } from './extension';
|
||||
import { CppSourceStr, clients, configPrefix, updateLanguageConfigurations, watchForCrashes } from './extension';
|
||||
import { LocalizeStringParams, getLocaleId, getLocalizedString } from './localization';
|
||||
import { PersistentFolderState, PersistentWorkspaceState } from './persistentState';
|
||||
import { createProtocolFilter } from './protocolFilter';
|
||||
@@ -536,7 +536,7 @@ interface DidChangeActiveEditorParams {
|
||||
}
|
||||
|
||||
// Requests
|
||||
const InitializationRequest: RequestType<CppInitializationParams, void, void> = new RequestType<CppInitializationParams, void, void>('cpptools/initialize');
|
||||
const InitializationRequest: RequestType<CppInitializationParams, string, void> = new RequestType<CppInitializationParams, string, void>('cpptools/initialize');
|
||||
const QueryCompilerDefaultsRequest: RequestType<QueryDefaultCompilerParams, configs.CompilerDefaults, void> = new RequestType<QueryDefaultCompilerParams, configs.CompilerDefaults, void>('cpptools/queryCompilerDefaults');
|
||||
const QueryTranslationUnitSourceRequest: RequestType<QueryTranslationUnitSourceParams, QueryTranslationUnitSourceResult, void> = new RequestType<QueryTranslationUnitSourceParams, QueryTranslationUnitSourceResult, void>('cpptools/queryTranslationUnitSource');
|
||||
const SwitchHeaderSourceRequest: RequestType<SwitchHeaderSourceParams, string, void> = new RequestType<SwitchHeaderSourceParams, string, void>('cpptools/didSwitchHeaderSource');
|
||||
@@ -1572,7 +1572,7 @@ export class DefaultClient implements Client {
|
||||
// Move initialization to a separate message, so we can see log output from it.
|
||||
// A request is used in order to wait for completion and ensure that no subsequent
|
||||
// higher priority message may be processed before the Initialization request.
|
||||
await languageClient.sendRequest(InitializationRequest, cppInitializationParams);
|
||||
watchForCrashes(await languageClient.sendRequest(InitializationRequest, cppInitializationParams));
|
||||
}
|
||||
|
||||
public async sendDidChangeSettings(): Promise<void> {
|
||||
|
||||
@@ -806,7 +806,7 @@ export class CppProperties {
|
||||
if (isGlobPattern) {
|
||||
// fastGlob silently strips non-found paths. Limit that behavior to dynamic paths only.
|
||||
const matches: string[] = fastGlob.isDynamicPattern(normalized) ?
|
||||
fastGlob.sync(normalized, { onlyDirectories: true, cwd }) : [res];
|
||||
fastGlob.sync(normalized, { onlyDirectories: true, cwd, suppressErrors: true, deep: 15 }) : [res];
|
||||
resolvedGlob.push(...matches.map(s => s + suffix));
|
||||
} else {
|
||||
resolvedGlob.push(normalized + suffix);
|
||||
@@ -1993,7 +1993,7 @@ export class CppProperties {
|
||||
|
||||
// Escape the path string for literal use in a regular expression
|
||||
// Need to escape any quotes to match the original text
|
||||
let escapedPath: string = curPath.replace(/\"/g, '\\\"');
|
||||
let escapedPath: string = curPath.replace(/"/g, '\\"');
|
||||
escapedPath = escapedPath.replace(/[-\"\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
||||
|
||||
// Create a pattern to search for the path with either a quote or semicolon immediately before and after,
|
||||
|
||||
@@ -14,6 +14,7 @@ import * as vscode from 'vscode';
|
||||
import { Range } from 'vscode-languageclient';
|
||||
import * as nls from 'vscode-nls';
|
||||
import { TargetPopulation } from 'vscode-tas-client';
|
||||
import * as which from 'which';
|
||||
import { logAndReturn } from '../Utility/Async/returns';
|
||||
import * as util from '../common';
|
||||
import { PlatformInformation } from '../platform';
|
||||
@@ -922,8 +923,8 @@ function reportMacCrashes(): void {
|
||||
const crashObject: Record<string, string> = {};
|
||||
if (err?.code) {
|
||||
// If the directory isn't there, we have a problem...
|
||||
crashObject["fs.stat: err.code"] = err.code;
|
||||
telemetry.logLanguageServerEvent("MacCrash", crashObject, undefined);
|
||||
crashObject["errCode"] = err.code;
|
||||
telemetry.logLanguageServerEvent("MacCrash", crashObject);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -959,17 +960,64 @@ function reportMacCrashes(): void {
|
||||
}
|
||||
}
|
||||
|
||||
let previousMacCrashData: string;
|
||||
let previousMacCrashCount: number = 0;
|
||||
export function watchForCrashes(crashDirectory: string): void {
|
||||
if (process.platform !== "win32") {
|
||||
prevCrashFile = "";
|
||||
fs.stat(crashDirectory, (err) => {
|
||||
const crashObject: Record<string, string> = {};
|
||||
if (err?.code) {
|
||||
// If the directory isn't there, we have a problem...
|
||||
crashObject["errCode"] = err.code;
|
||||
telemetry.logLanguageServerEvent("CppCrash", crashObject);
|
||||
return;
|
||||
}
|
||||
|
||||
function logMacCrashTelemetry(data: string): void {
|
||||
// vscode.workspace.createFileSystemWatcher only works in workspace folders.
|
||||
try {
|
||||
fs.watch(crashDirectory, (event, filename) => {
|
||||
if (event !== "rename") {
|
||||
return;
|
||||
}
|
||||
if (!filename || filename === prevCrashFile) {
|
||||
return;
|
||||
}
|
||||
prevCrashFile = filename;
|
||||
if (!filename.startsWith("cpptools")) {
|
||||
return;
|
||||
}
|
||||
// Wait 5 seconds to allow time for the crash log to finish being written.
|
||||
setTimeout(() => {
|
||||
fs.readFile(path.resolve(crashDirectory, filename), 'utf8', (err, data) => {
|
||||
void handleCrashFileRead(crashDirectory, filename, err, data);
|
||||
});
|
||||
}, 5000);
|
||||
});
|
||||
} catch (e) {
|
||||
// The file watcher limit is hit (may not be possible on Mac, but just in case).
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
let previousCrashData: string;
|
||||
let previousCrashCount: number = 0;
|
||||
|
||||
function logCrashTelemetry(data: string, type: string): void {
|
||||
const crashObject: Record<string, string> = {};
|
||||
const crashCountObject: Record<string, number> = {};
|
||||
crashObject.CrashingThreadCallStack = data;
|
||||
previousMacCrashCount = data === previousMacCrashData ? previousMacCrashCount + 1 : 0;
|
||||
previousMacCrashData = data;
|
||||
crashCountObject.CrashCount = previousMacCrashCount;
|
||||
telemetry.logLanguageServerEvent("MacCrash", crashObject, crashCountObject);
|
||||
previousCrashCount = data === previousCrashData ? previousCrashCount + 1 : 0;
|
||||
previousCrashData = data;
|
||||
crashCountObject.CrashCount = previousCrashCount + 1;
|
||||
telemetry.logLanguageServerEvent(type, crashObject, crashCountObject);
|
||||
}
|
||||
|
||||
function logMacCrashTelemetry(data: string): void {
|
||||
logCrashTelemetry(data, "MacCrash");
|
||||
}
|
||||
|
||||
function logCppCrashTelemetry(data: string): void {
|
||||
logCrashTelemetry(data, "CppCrash");
|
||||
}
|
||||
|
||||
function handleMacCrashFileRead(err: NodeJS.ErrnoException | undefined | null, data: string): void {
|
||||
@@ -1062,6 +1110,75 @@ function handleMacCrashFileRead(err: NodeJS.ErrnoException | undefined | null, d
|
||||
logMacCrashTelemetry(data);
|
||||
}
|
||||
|
||||
async function handleCrashFileRead(crashDirectory: string, crashFile: string, err: NodeJS.ErrnoException | undefined | null, data: string): Promise<void> {
|
||||
if (err) {
|
||||
if (err.code === "ENOENT") {
|
||||
return; // ignore known issue
|
||||
}
|
||||
return logCppCrashTelemetry("readFile: " + err.code);
|
||||
}
|
||||
|
||||
const lines: string[] = data.split("\n");
|
||||
data = crashFile + "\n";
|
||||
const filtPath: string | null = which.sync("c++filt", { nothrow: true });
|
||||
const isMac: boolean = process.platform === "darwin";
|
||||
const startStr: string = isMac ? " _" : "(_";
|
||||
const offsetStr: string = isMac ? " + " : "+0x";
|
||||
const dotStr: string = "…";
|
||||
for (let lineNum: number = 2; lineNum < lines.length - 3; ++lineNum) { // skip first/last lines
|
||||
if (lineNum > 2) {
|
||||
data += "\n";
|
||||
}
|
||||
const line: string = lines[lineNum];
|
||||
const startPos: number = line.indexOf(startStr);
|
||||
if (startPos === -1) {
|
||||
data += dotStr;
|
||||
continue; // expected
|
||||
}
|
||||
const offsetPos: number = line.indexOf(offsetStr, startPos + startStr.length);
|
||||
if (offsetPos === -1) {
|
||||
data += `missing "${offsetStr}"`;
|
||||
continue; // unexpected
|
||||
}
|
||||
const startPos2: number = startPos + 1;
|
||||
let funcStr: string = line.substring(startPos2, offsetPos);
|
||||
if (filtPath) {
|
||||
const ret = await util.spawnChildProcess(filtPath, [funcStr], undefined, true).catch(logAndReturn.undefined);
|
||||
if (ret !== undefined) {
|
||||
funcStr = ret.output;
|
||||
funcStr = funcStr.replace(/std::(?:__1|__cxx11)/g, "std"); // simplify std namespaces.
|
||||
funcStr = funcStr.replace(/std::basic_/g, "std::");
|
||||
funcStr = funcStr.replace(/ >/g, ">");
|
||||
funcStr = funcStr.replace(/, std::(?:allocator|char_traits)<char>/g, "");
|
||||
funcStr = funcStr.replace(/<char>/g, "");
|
||||
funcStr = funcStr.replace(/, std::allocator<std::string>/g, "");
|
||||
}
|
||||
}
|
||||
data += funcStr + offsetStr;
|
||||
const offsetPos2: number = offsetPos + offsetStr.length;
|
||||
if (isMac) {
|
||||
data += line.substring(offsetPos2);
|
||||
} else {
|
||||
const endPos: number = line.indexOf(")", offsetPos2);
|
||||
if (endPos === -1) {
|
||||
data += "missing )";
|
||||
continue; // unexpected
|
||||
}
|
||||
data += line.substring(offsetPos2, endPos);
|
||||
}
|
||||
}
|
||||
|
||||
if (data.length > 8192) { // The API has an 8k limit.
|
||||
data = data.substring(0, 8191) + "…";
|
||||
}
|
||||
|
||||
console.log(`Crash call stack:\n${data}`);
|
||||
logCppCrashTelemetry(data);
|
||||
|
||||
await util.deleteFile(path.resolve(crashDirectory, crashFile)).catch(logAndReturn.undefined);
|
||||
void util.deleteDirectory(crashDirectory).catch(logAndReturn.undefined);
|
||||
}
|
||||
|
||||
export function deactivate(): Thenable<void> {
|
||||
clients.timeTelemetryCollector.clear();
|
||||
console.log("deactivating extension");
|
||||
|
||||
@@ -10,6 +10,7 @@ import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import * as semver from 'semver';
|
||||
import { quote } from 'shell-quote';
|
||||
import * as vscode from 'vscode';
|
||||
import * as nls from 'vscode-nls';
|
||||
import * as which from 'which';
|
||||
@@ -278,7 +279,7 @@ export class CppSettings extends Settings {
|
||||
let clangVersion: string;
|
||||
try {
|
||||
const exePath: string = getExtensionFilePath(`./LLVM/bin/${clangName}`);
|
||||
const output: string[] = execSync(`${exePath} --version`).toString().split(" ");
|
||||
const output: string[] = execSync(quote([exePath, '--version'])).toString().split(" ");
|
||||
if (output.length < 3 || output[0] !== clangStr || output[1] !== "version" || !semver.valid(output[2])) {
|
||||
if (output.length === 3) {
|
||||
return path;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { isIdentifierPart, isIdentifierStart } from './characterCodes';
|
||||
|
||||
/** simple dynamic tagged literal implementation */
|
||||
export function taggedLiteral(templateString: string, templateVars: Record<string, any>): string {
|
||||
return safeEval(`\`${templateString.replace('\\', '\\\\').replace(/`/, '\`')}\`;`, templateVars) as string;
|
||||
return safeEval(`\`${templateString.replace(/\\/g, '\\\\').replace(/`/g, '\`')}\`;`, templateVars) as string;
|
||||
}
|
||||
|
||||
function parseTaggedLiteral(templateString: string) {
|
||||
|
||||
+26
-8
@@ -677,6 +677,22 @@ export function deleteFile(filePath: string): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteDirectory(directoryPath: string): Promise<void> {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
if (fs.existsSync(directoryPath)) {
|
||||
fs.rmdir(directoryPath, (err) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function getReadmeMessage(): string {
|
||||
const readmePath: string = getExtensionFilePath("README.md");
|
||||
const readmeMessage: string = localize("refer.read.me", "Please refer to {0} for troubleshooting information. Issues can be created at {1}", readmePath, "https://github.com/Microsoft/vscode-cpptools/issues");
|
||||
@@ -736,14 +752,16 @@ export interface ProcessReturnType {
|
||||
output: string;
|
||||
}
|
||||
|
||||
export async function spawnChildProcess(program: string, args: string[] = [], continueOn?: string, cancellationToken?: vscode.CancellationToken): Promise<ProcessReturnType> {
|
||||
export async function spawnChildProcess(program: string, args: string[] = [], continueOn?: string, skipLogging?: boolean, cancellationToken?: vscode.CancellationToken): Promise<ProcessReturnType> {
|
||||
// Do not use CppSettings to avoid circular require()
|
||||
const settings: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", null);
|
||||
const loggingLevel: string | undefined = settings.get<string>("loggingLevel");
|
||||
if (loggingLevel === "Information" || loggingLevel === "Debug") {
|
||||
getOutputChannelLogger().appendLine(`$ ${program} ${args.join(' ')}`);
|
||||
if (skipLogging === undefined || !skipLogging) {
|
||||
const settings: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", null);
|
||||
const loggingLevel: string | undefined = settings.get<string>("loggingLevel");
|
||||
if (loggingLevel === "Information" || loggingLevel === "Debug") {
|
||||
getOutputChannelLogger().appendLine(`$ ${program} ${args.join(' ')}`);
|
||||
}
|
||||
}
|
||||
const programOutput: ProcessOutput = await spawnChildProcessImpl(program, args, continueOn, cancellationToken);
|
||||
const programOutput: ProcessOutput = await spawnChildProcessImpl(program, args, continueOn, skipLogging, cancellationToken);
|
||||
const exitCode: number | NodeJS.Signals | undefined = programOutput.exitCode;
|
||||
if (programOutput.exitCode) {
|
||||
return { succeeded: false, exitCode, output: programOutput.stderr || programOutput.stdout || localize('process.exited', 'Process exited with code {0}', exitCode) };
|
||||
@@ -765,12 +783,12 @@ interface ProcessOutput {
|
||||
stderr: string;
|
||||
}
|
||||
|
||||
async function spawnChildProcessImpl(program: string, args: string[], continueOn?: string, cancellationToken?: vscode.CancellationToken): Promise<ProcessOutput> {
|
||||
async function spawnChildProcessImpl(program: string, args: string[], continueOn?: string, skipLogging?: boolean, cancellationToken?: vscode.CancellationToken): Promise<ProcessOutput> {
|
||||
const result = new ManualPromise<ProcessOutput>();
|
||||
|
||||
// Do not use CppSettings to avoid circular require()
|
||||
const settings: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("C_Cpp", null);
|
||||
const loggingLevel: string | undefined = settings.get<string>("loggingLevel");
|
||||
const loggingLevel: string | undefined = (skipLogging === undefined || !skipLogging) ? settings.get<string>("loggingLevel") : "None";
|
||||
|
||||
let proc: child_process.ChildProcess;
|
||||
if (await isExecutable(program)) {
|
||||
|
||||
@@ -238,7 +238,7 @@ suite("resolveVariables", () => {
|
||||
]
|
||||
*/
|
||||
testQuoteArgumentScenario("-DTEST1=TEST1 TEST1", "\"-DTEST1=TEST1 TEST1\"");
|
||||
testQuoteArgumentScenario("-DTEST2=\"TEST2 TEST2\"", "-DTEST2=\"TEST2 TEST2\"");
|
||||
testQuoteArgumentScenario("-DTEST2=\"TEST2 TEST2\"", "\"-DTEST2=\"TEST2 TEST2\"\"");
|
||||
testQuoteArgumentScenario("-DTEST3=\\\"TEST3 TEST3\\\"", "\"-DTEST3=\\\"TEST3 TEST3\\\"\"");
|
||||
testQuoteArgumentScenario("-DTEST4=TEST4\\ TEST4", "\"-DTEST4=TEST4 TEST4\"");
|
||||
testQuoteArgumentScenario("-DTEST5=\'TEST5 TEST5\'", "-DTEST5=\'TEST5 TEST5\'");
|
||||
|
||||
@@ -321,7 +321,7 @@ class SettingsApp {
|
||||
private showErrorWithInfo(elementID: string, errorInfo: string): void {
|
||||
this.showElement(elementID, errorInfo ? true : false);
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
document.getElementById(elementID)!.innerHTML = errorInfo ? errorInfo : "";
|
||||
document.getElementById(elementID)!.textContent = errorInfo ? errorInfo : "";
|
||||
}
|
||||
|
||||
private updateConfigSelection(message: any): void {
|
||||
|
||||
+3
-3
@@ -2272,9 +2272,9 @@ flush-write-stream@^1.0.2:
|
||||
readable-stream "^2.3.6"
|
||||
|
||||
follow-redirects@^1.15.0:
|
||||
version "1.15.3"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a"
|
||||
integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==
|
||||
version "1.15.4"
|
||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.4.tgz#cdc7d308bf6493126b17ea2191ea0ccf3e535adf"
|
||||
integrity sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==
|
||||
|
||||
for-each@^0.3.3:
|
||||
version "0.3.3"
|
||||
|
||||
Reference in New Issue
Block a user