diff --git a/Build/loc/TranslationsImportExport.yml b/Build/loc/TranslationsImportExport.yml index 04ce8e8ed1..2ac6819ae6 100644 --- a/Build/loc/TranslationsImportExport.yml +++ b/Build/loc/TranslationsImportExport.yml @@ -41,6 +41,7 @@ steps: patVariable: '$(OneLocBuildPat)' LclSource: lclFilesfromPackage LclPackageId: 'LCL-JUNO-PROD-VCPP' + lsBuildXLocPackageVersion: '7.0.30510' - task: CmdLine@2 inputs: diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 1753de9d69..ad888c9c5a 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,19 @@ # C/C++ for Visual Studio Code Change Log +## Version 1.4.0-insiders3: May 24, 2021 +### Enhancements +* Add `private` or `protected` scope labels to class symbols. [#7120](https://github.com/microsoft/vscode-cpptools/issues/7120) +* Improvements to the C++ "Getting Started" walkthrough. [PR #7554](https://github.com/microsoft/vscode-cpptools/pull/7554) + +### Bug Fixes +* Fix bitness detection for compilers targeting esp32. [#7034](https://github.com/microsoft/vscode-cpptools/issues/7034) +* Fix issue with cpptools process lingering when no longer needed. [#7262](https://github.com/microsoft/vscode-cpptools/issues/7262) +* Fix enabling of the `ms_extensions` flag for clang on Windows. [#7529](https://github.com/microsoft/vscode-cpptools/issues/7529) +* Fix `autocompleteAddParentheses` with no argument const/non-const overloads and deduction guides. [#7540](https://github.com/microsoft/vscode-cpptools/issues/7540), [#7541](https://github.com/microsoft/vscode-cpptools/issues/7541) +* Fix clang-format failure on macOS 10.13 or older. [#7561](https://github.com/microsoft/vscode-cpptools/issues/7561) +* Prevent 'Configuration Warnings' output when a custom configuration provider omits optional fields. +* Prevent 'Configuration Warnings' caused by corrections to auto-detected default configuration values. + ## Version 1.4.0-insiders2: May 17, 2021 ### New Features * Add a C++ walkthrough to the "Getting Started" page. [#7273](https://github.com/microsoft/vscode-cpptools/issues/7273) @@ -7,7 +21,7 @@ ### Bug Fixes * Fix an incorrect IntelliSense error with object initialization. [#3212](https://github.com/microsoft/vscode-cpptools/issues/3212) -* Fix macros getting undefined when duplicate `#include` are used. [#5182](https://github.com/microsoft/vscode-cpptools/issues/5182], [#7270](https://github.com/microsoft/vscode-cpptools/issues/7270) +* Fix macros getting undefined when duplicate `#include` are used. [#5182](https://github.com/microsoft/vscode-cpptools/issues/5182), [#7270](https://github.com/microsoft/vscode-cpptools/issues/7270) * Fix IntelliSense crash with `#pragma GCC target`. [#6698](https://github.com/microsoft/vscode-cpptools/issues/6698), [#7377](https://github.com/microsoft/vscode-cpptools/issues/7377) * Fix completion at the end of a file. [#7472](https://github.com/microsoft/vscode-cpptools/issues/7472) * Fix completion of constructors. [#7505](https://github.com/microsoft/vscode-cpptools/issues/7505) diff --git a/Extension/i18n/chs/src/LanguageServer/client.i18n.json b/Extension/i18n/chs/src/LanguageServer/client.i18n.json index e6826baa6a..60e99d6648 100644 --- a/Extension/i18n/chs/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/chs/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "是", "no.button": "否", "configurations.received": "已收到自定义配置:", - "browse.configuration.received": "已收到自定义浏览配置: {0}" + "browse.configuration.received": "已收到自定义浏览配置: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/cht/src/LanguageServer/client.i18n.json b/Extension/i18n/cht/src/LanguageServer/client.i18n.json index 4879dd2448..14eafc3ae5 100644 --- a/Extension/i18n/cht/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/cht/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "是", "no.button": "否", "configurations.received": "收到的自訂組態:", - "browse.configuration.received": "收到的自訂瀏覽組態: {0}" + "browse.configuration.received": "收到的自訂瀏覽組態: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/csy/src/LanguageServer/client.i18n.json b/Extension/i18n/csy/src/LanguageServer/client.i18n.json index 57284f8e0b..39b9b0d0c3 100644 --- a/Extension/i18n/csy/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/csy/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "Ano", "no.button": "Ne", "configurations.received": "Přijaly se vlastní konfigurace:", - "browse.configuration.received": "Přijala se vlastní konfigurace procházení: {0}" + "browse.configuration.received": "Přijala se vlastní konfigurace procházení: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/deu/src/LanguageServer/client.i18n.json b/Extension/i18n/deu/src/LanguageServer/client.i18n.json index a08f2912f6..ceaafc3bac 100644 --- a/Extension/i18n/deu/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/deu/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "Ja", "no.button": "Nein", "configurations.received": "Benutzerdefinierte Konfigurationen empfangen:", - "browse.configuration.received": "Benutzerdefinierte Suchkonfiguration empfangen: {0}" + "browse.configuration.received": "Benutzerdefinierte Suchkonfiguration empfangen: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/esn/src/LanguageServer/client.i18n.json b/Extension/i18n/esn/src/LanguageServer/client.i18n.json index d95bd39b89..bfcf9b6a73 100644 --- a/Extension/i18n/esn/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/esn/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "Sí", "no.button": "No", "configurations.received": "Configuraciones personalizadas recibidas:", - "browse.configuration.received": "Configuración de exploración personalizada recibida: {0}" + "browse.configuration.received": "Configuración de exploración personalizada recibida: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/fra/src/LanguageServer/client.i18n.json b/Extension/i18n/fra/src/LanguageServer/client.i18n.json index f806b261fd..ca676a649c 100644 --- a/Extension/i18n/fra/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/fra/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "Oui", "no.button": "Non", "configurations.received": "Configurations personnalisées reçues :", - "browse.configuration.received": "Configuration de navigation personnalisée reçue : {0}" + "browse.configuration.received": "Configuration de navigation personnalisée reçue : {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/ita/src/LanguageServer/client.i18n.json b/Extension/i18n/ita/src/LanguageServer/client.i18n.json index c871e48ba1..1a186c4fe1 100644 --- a/Extension/i18n/ita/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/ita/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "Sì", "no.button": "No", "configurations.received": "Configurazioni personalizzate ricevute:", - "browse.configuration.received": "La configurazione di esplorazione personalizzata è stata ricevuta: {0}" + "browse.configuration.received": "La configurazione di esplorazione personalizzata è stata ricevuta: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/jpn/src/LanguageServer/client.i18n.json b/Extension/i18n/jpn/src/LanguageServer/client.i18n.json index 1375062b75..d0c31a1caa 100644 --- a/Extension/i18n/jpn/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/jpn/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "はい", "no.button": "いいえ", "configurations.received": "カスタム構成を受信しました:", - "browse.configuration.received": "カスタムの参照構成を受信しました: {0}" + "browse.configuration.received": "カスタムの参照構成を受信しました: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/kor/src/LanguageServer/client.i18n.json b/Extension/i18n/kor/src/LanguageServer/client.i18n.json index 18ba0cd7b9..0f49b6bbe4 100644 --- a/Extension/i18n/kor/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/kor/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "예", "no.button": "아니요", "configurations.received": "사용자 지정 구성이 수신됨:", - "browse.configuration.received": "사용자 지정 찾아보기 구성이 수신됨: {0}" + "browse.configuration.received": "사용자 지정 찾아보기 구성이 수신됨: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/plk/src/LanguageServer/client.i18n.json b/Extension/i18n/plk/src/LanguageServer/client.i18n.json index eef7e9ac06..ef1b10959e 100644 --- a/Extension/i18n/plk/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/plk/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "Tak", "no.button": "Nie", "configurations.received": "Odebrano konfiguracje niestandardowe:", - "browse.configuration.received": "Odebrano niestandardową konfigurację przeglądania: {0}" + "browse.configuration.received": "Odebrano niestandardową konfigurację przeglądania: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/ptb/src/LanguageServer/client.i18n.json b/Extension/i18n/ptb/src/LanguageServer/client.i18n.json index 566bcfc9de..cdf9b7a825 100644 --- a/Extension/i18n/ptb/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/ptb/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "Sim", "no.button": "Não", "configurations.received": "Configurações personalizadas recebidas:", - "browse.configuration.received": "Configuração de pesquisa personalizada recebida: {0}" + "browse.configuration.received": "Configuração de pesquisa personalizada recebida: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/rus/src/LanguageServer/client.i18n.json b/Extension/i18n/rus/src/LanguageServer/client.i18n.json index 8bc6077c7a..486d6bcd39 100644 --- a/Extension/i18n/rus/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/rus/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "Да", "no.button": "Нет", "configurations.received": "Получены пользовательские конфигурации:", - "browse.configuration.received": "Получена настраиваемая конфигурация просмотра: {0}" + "browse.configuration.received": "Получена настраиваемая конфигурация просмотра: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/i18n/trk/src/LanguageServer/client.i18n.json b/Extension/i18n/trk/src/LanguageServer/client.i18n.json index 6dcc315fe1..38ef606b4d 100644 --- a/Extension/i18n/trk/src/LanguageServer/client.i18n.json +++ b/Extension/i18n/trk/src/LanguageServer/client.i18n.json @@ -33,5 +33,8 @@ "yes.button": "Evet", "no.button": "Hayır", "configurations.received": "Alınan özel yapılandırmalar:", - "browse.configuration.received": "Özel gözatma yapılandırması alındı: {0}" + "browse.configuration.received": "Özel gözatma yapılandırması alındı: {0}", + "no.compilers.found": "No C++ compilers were found on your system. For your platform, we recommend installing {0} using the instructions in the editor.", + "compilers.found": "We found the following C++ compiler(s) on your system:", + "compilers.found.message": "You can specify which compiler to use in your project's IntelliSense Configuration." } \ No newline at end of file diff --git a/Extension/package.json b/Extension/package.json index 46c67a1d24..2b3f09e616 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -112,40 +112,10 @@ } } }, - { - "id": "build.project.mac", - "title": "Build your C++ file", - "description": "Create a default build task for your project. \n[Learn more](https://code.visualstudio.com/docs/cpp/config-clang-mac#_build-helloworldcpp)", - "when": "isMac", - "media": { - "altText": "A markdown file with instructions for configuring the default build task on macOS with Clang.", - "path": "walkthrough/buildtask/build-project-mac.md" - } - }, - { - "id": "build.project.linux", - "title": "Build your C++ file", - "description": "Create a default build task for your project. \n[Learn more](https://code.visualstudio.com/docs/cpp/config-linux#_build-helloworldcpp)", - "when": "isLinux", - "media": { - "altText": "A markdown file with instructions for configuring the default build task on Linux with GCC.", - "path": "walkthrough/buildtask/build-project-linux.md" - } - }, - { - "id": "build.project.windows", - "title": "Build your C++ file", - "description": "Create a default build task for your project. \n[Learn more](https://code.visualstudio.com/docs/cpp/config-msvc#_build-helloworldcpp)", - "when": "isWindows", - "media": { - "altText": "A markdown file with instructions for configuring the default build task on Windows with MSVC.", - "path": "walkthrough/buildtask/build-project-windows.md" - } - }, { "id": "run.project.mac", "title": "Run and debug your C++ file", - "description": "Create a debug configuration for your project. \n[Learn more](https://code.visualstudio.com/docs/cpp/config-clang-mac#_debug-helloworldcpp)", + "description": "Create a default build task and debug configuration for your project. \n[Learn more](https://code.visualstudio.com/docs/cpp/config-clang-mac#_debug-helloworldcpp)", "when": "isMac", "media": { "altText": "A markdown file with instructions for starting a debugging session on macOS.", @@ -155,7 +125,7 @@ { "id": "run.project.linux", "title": "Run and debug your C++ file", - "description": "Create a debug configuration for your project. \n[Learn more](https://code.visualstudio.com/docs/cpp/config-linux#_debug-helloworldcpp)", + "description": "Create a default build task and debug configuration for your project. \n[Learn more](https://code.visualstudio.com/docs/cpp/config-linux#_debug-helloworldcpp)", "when": "isLinux", "media": { "altText": "A markdown file with instructions for starting a debugging session on Linux.", @@ -165,7 +135,7 @@ { "id": "run.project.windows", "title": "Run and debug your C++ file", - "description": "Create a debug configuration for your project. \n[Learn more](https://code.visualstudio.com/docs/cpp/config-msvc#_debug-helloworldcpp)", + "description": "Create a default build task and debug configuration for your project. \n[Learn more](https://code.visualstudio.com/docs/cpp/config-msvc#_debug-helloworldcpp)", "when": "isWindows", "media": { "altText": "A markdown file with instructions for starting a debugging session on Windows.", @@ -249,7 +219,7 @@ "viewsWelcome": [ { "view": "debug", - "contents": "To learn more about launch.json, see [Configuring C/C++ debugging](https://code.visualstudio.com/docs/cpp/launch-json-reference).", + "contents": "%c_cpp.contributes.viewsWelcome.contents%", "when": "debugStartLanguage == cpp || debugStartLanguage == c || debugStartLanguage == cuda-cpp" } ], @@ -2832,7 +2802,7 @@ "binaries": [ "./LLVM/bin/clang-format.darwin" ], - "integrity": "62A2ECB43511129F920D87BAE9230A803B54712038BCCB485F8F10B84B1A2000" + "integrity": "AEB24D394118EAD87087DCC651F2EE329FC335ECE88ED6C8C2A9E93ED60DFECD" }, { "description": "ClangFormat (OS X arm64)", @@ -2846,7 +2816,7 @@ "binaries": [ "./LLVM/bin/clang-format.darwin" ], - "integrity": "90AD3B05EC9C0A706C440B99AC39000F97EFE8BBAB9A000834E18F8112468147" + "integrity": "AE5507F54562B9DA99E3F8318E25C93BD38AD2FBF4238ADF1C152ECFB0C10FA9" }, { "description": "ClangFormat (Windows x86)", diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 77c3e52562..348cd6978c 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -171,6 +171,7 @@ "c_cpp.configuration.filesExcludeWhen.description": "Additional check on the siblings of a matching file. Use $(basename) as variable for the matching file name.", "c_cpp.configuration.debugger.useBacktickCommandSubstitution.description": "If true, debugger shell command substitution will use obsolete backtick (`).", "c_cpp.contributes.views.cppReferencesView.title": "C/C++: Other references results", + "c_cpp.contributes.viewsWelcome.contents": "To learn more about launch.json, see [Configuring C/C++ debugging](https://code.visualstudio.com/docs/cpp/launch-json-reference).", "c_cpp.debuggers.pipeTransport.description": "When present, this tells the debugger to connect to a remote computer using another executable as a pipe that will relay standard input/output between VS Code and the MI-enabled debugger backend executable (such as gdb).", "c_cpp.debuggers.pipeTransport.default.pipeProgram": "enter the fully qualified path for the pipe program name, for example '/usr/bin/ssh'", "c_cpp.debuggers.pipeTransport.default.debuggerPath": "The full path to the debugger on the target machine, for example /usr/bin/gdb.", diff --git a/Extension/src/LanguageServer/Providers/documentSymbolProvider.ts b/Extension/src/LanguageServer/Providers/documentSymbolProvider.ts index 7fd2488cab..62ea2d87f7 100644 --- a/Extension/src/LanguageServer/Providers/documentSymbolProvider.ts +++ b/Extension/src/LanguageServer/Providers/documentSymbolProvider.ts @@ -3,7 +3,7 @@ * See 'LICENSE' in the project root for license information. * ------------------------------------------------------------------------------------------ */ import * as vscode from 'vscode'; -import { DefaultClient, LocalizeDocumentSymbol, GetDocumentSymbolRequestParams, GetDocumentSymbolRequest } from '../client'; +import { DefaultClient, LocalizeDocumentSymbol, GetDocumentSymbolRequestParams, GetDocumentSymbolRequest, SymbolScope } from '../client'; import * as util from '../../common'; import { processDelayedDidOpen } from '../extension'; @@ -16,7 +16,20 @@ export class DocumentSymbolProvider implements vscode.DocumentSymbolProvider { const documentSymbols: vscode.DocumentSymbol[] = []; if (symbols) { symbols.forEach((symbol) => { - const detail: string = util.getLocalizedString(symbol.detail); + let detail: string = util.getLocalizedString(symbol.detail); + if (symbol.scope === SymbolScope.Private) { + if (detail.length === 0) { + detail = "private"; + } else { + detail = util.getLocalizedSymbolScope("private", detail); + } + } else if (symbol.scope === SymbolScope.Protected) { + if (detail.length === 0) { + detail = "protected"; + } else { + detail = util.getLocalizedSymbolScope("protected", detail); + } + } const r: vscode.Range = new vscode.Range(symbol.range.start.line, symbol.range.start.character, symbol.range.end.line, symbol.range.end.character); const sr: vscode.Range = new vscode.Range(symbol.selectionRange.start.line, symbol.selectionRange.start.character, symbol.selectionRange.end.line, symbol.selectionRange.end.character); const vscodeSymbol: vscode.DocumentSymbol = new vscode.DocumentSymbol(symbol.name, detail, symbol.kind, r, sr); diff --git a/Extension/src/LanguageServer/Providers/workspaceSymbolProvider.ts b/Extension/src/LanguageServer/Providers/workspaceSymbolProvider.ts index b2b8666946..726cd11fb6 100644 --- a/Extension/src/LanguageServer/Providers/workspaceSymbolProvider.ts +++ b/Extension/src/LanguageServer/Providers/workspaceSymbolProvider.ts @@ -3,7 +3,7 @@ * See 'LICENSE' in the project root for license information. * ------------------------------------------------------------------------------------------ */ import * as vscode from 'vscode'; -import { DefaultClient, GetSymbolInfoRequest, WorkspaceSymbolParams, LocalizeSymbolInformation } from '../client'; +import { DefaultClient, GetSymbolInfoRequest, WorkspaceSymbolParams, LocalizeSymbolInformation, SymbolScope } from '../client'; import * as util from '../../common'; export class WorkspaceSymbolProvider implements vscode.WorkspaceSymbolProvider { @@ -22,10 +22,21 @@ export class WorkspaceSymbolProvider implements vscode.WorkspaceSymbolProvider { // Convert to vscode.Command array symbols.forEach((symbol) => { - const suffix: string = util.getLocalizedString(symbol.suffix); + let suffix: string = util.getLocalizedString(symbol.suffix); let name: string = symbol.name; if (suffix.length) { + if (symbol.scope === SymbolScope.Private) { + suffix = util.getLocalizedSymbolScope("private", suffix); + } else if (symbol.scope === SymbolScope.Protected) { + suffix = util.getLocalizedSymbolScope("protected", suffix); + } name = name + ' (' + suffix + ')'; + } else { + if (symbol.scope === SymbolScope.Private) { + name = name + " (private)"; + } else if (symbol.scope === SymbolScope.Protected) { + name = name + " (protected)"; + } } const range: vscode.Range = new vscode.Range(symbol.location.range.start.line, symbol.location.range.start.character, symbol.location.range.end.line, symbol.location.range.end.character); const uri: vscode.Uri = vscode.Uri.parse(symbol.location.uri.toString()); diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 21e52739de..cdfa0000f7 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -297,10 +297,17 @@ export interface WorkspaceSymbolParams extends WorkspaceFolderParams { query: string; } +export enum SymbolScope { + Public = 0, + Protected = 1, + Private = 2 +} + export interface LocalizeDocumentSymbol { name: string; detail: LocalizeStringParams; kind: vscode.SymbolKind; + scope: SymbolScope; range: Range; selectionRange: Range; children: LocalizeDocumentSymbol[]; @@ -315,6 +322,7 @@ interface Location { export interface LocalizeSymbolInformation { name: string; kind: vscode.SymbolKind; + scope: SymbolScope; location: Location; containerName: string; suffix: LocalizeStringParams; @@ -1250,7 +1258,8 @@ export class DefaultClient implements Client { experimentalFeatures: workspaceSettings.experimentalFeatures, edgeMessagesDirectory: path.join(util.getExtensionFilePath("bin"), "messages", util.getLocaleId()), localizedStrings: localizedStrings, - supportCuda: util.supportCuda + supportCuda: util.supportCuda, + packageVersion: util.packageJson.version }, middleware: createProtocolFilter(allClients), errorHandler: { @@ -2331,7 +2340,11 @@ export class DefaultClient implements Client { private doneInitialCustomBrowseConfigurationCheck: Boolean = false; - private onConfigurationsChanged(configurations: configs.Configuration[]): void { + private onConfigurationsChanged(cppProperties: configs.CppProperties): void { + if (!cppProperties.Configurations) { + return; + } + const configurations: configs.Configuration[] = cppProperties.Configurations; const params: CppPropertiesParams = { configurations: configurations, currentConfiguration: this.configuration.CurrentConfigurationIndex, @@ -2345,29 +2358,20 @@ export class DefaultClient implements Client { c.compilerPath = compilerPathAndArgs.compilerPath; c.compilerArgs = compilerPathAndArgs.additionalArgs; }); - let sendLastCustomBrowseConfiguration: boolean = false; - const rootFolder: vscode.WorkspaceFolder | undefined = this.RootFolder; - if (!rootFolder) { - this.languageClient.sendNotification(ChangeCppPropertiesNotification, params); - } else { - const lastCustomBrowseConfigurationProviderId: PersistentFolderState = new PersistentFolderState("CPP.lastCustomBrowseConfigurationProviderId", undefined, rootFolder); - const lastCustomBrowseConfiguration: PersistentFolderState = new PersistentFolderState("CPP.lastCustomBrowseConfiguration", undefined, rootFolder); + this.languageClient.sendNotification(ChangeCppPropertiesNotification, params); + const lastCustomBrowseConfigurationProviderId: PersistentFolderState | undefined = cppProperties.LastCustomBrowseConfigurationProviderId; + const lastCustomBrowseConfiguration: PersistentFolderState | undefined = cppProperties.LastCustomBrowseConfiguration; + if (!!lastCustomBrowseConfigurationProviderId && !!lastCustomBrowseConfiguration) { if (!this.doneInitialCustomBrowseConfigurationCheck) { // Send the last custom browse configuration we received from this provider. // This ensures we don't start tag parsing without it, and undo'ing work we have to re-do when the (likely same) browse config arrives // Should only execute on launch, for the initial delivery of configurations - if (isSameProviderExtensionId(lastCustomBrowseConfigurationProviderId.Value, configurations[params.currentConfiguration].configurationProvider)) { - if (lastCustomBrowseConfiguration.Value) { - sendLastCustomBrowseConfiguration = true; - params.isReady = false; - } + if (lastCustomBrowseConfiguration.Value) { + this.sendCustomBrowseConfiguration(lastCustomBrowseConfiguration.Value, lastCustomBrowseConfigurationProviderId.Value); + params.isReady = false; } this.doneInitialCustomBrowseConfigurationCheck = true; } - this.languageClient.sendNotification(ChangeCppPropertiesNotification, params); - if (sendLastCustomBrowseConfiguration) { - this.sendCustomBrowseConfiguration(lastCustomBrowseConfiguration.Value, lastCustomBrowseConfigurationProviderId.Value); - } } const configName: string | undefined = configurations[params.currentConfiguration].name ?? ""; this.model.activeConfigName.setValueIfActive(configName); diff --git a/Extension/src/LanguageServer/configurations.ts b/Extension/src/LanguageServer/configurations.ts index 7f40f5fc57..d861a47e28 100644 --- a/Extension/src/LanguageServer/configurations.ts +++ b/Extension/src/LanguageServer/configurations.ts @@ -20,6 +20,7 @@ import * as jsonc from 'comment-json'; import * as nls from 'vscode-nls'; import { setTimeout } from 'timers'; import * as which from 'which'; +import { WorkspaceBrowseConfiguration } from 'vscode-cpptools'; nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })(); const localize: nls.LocalizeFunc = nls.loadMessageBundle(); @@ -138,13 +139,15 @@ export class CppProperties { private defaultCustomConfigurationVariables?: { [key: string]: string }; private readonly configurationGlobPattern: string = "c_cpp_properties.json"; private disposables: vscode.Disposable[] = []; - private configurationsChanged = new vscode.EventEmitter(); + private configurationsChanged = new vscode.EventEmitter(); private selectionChanged = new vscode.EventEmitter(); private compileCommandsChanged = new vscode.EventEmitter(); private diagnosticCollection: vscode.DiagnosticCollection; private prevSquiggleMetrics: Map = new Map(); private rootfs: string | null = null; private settingsPanel?: SettingsPanel; + private lastCustomBrowseConfiguration: PersistentFolderState | undefined; + private lastCustomBrowseConfigurationProviderId: PersistentFolderState | undefined; // Any time the default settings are parsed and assigned to `this.configurationJson`, // we want to track when the default includes have been added to it. @@ -155,6 +158,8 @@ export class CppProperties { const rootPath: string = rootUri ? rootUri.fsPath : ""; if (workspaceFolder) { this.currentConfigurationIndex = new PersistentFolderState("CppProperties.currentConfigurationIndex", -1, workspaceFolder); + this.lastCustomBrowseConfiguration = new PersistentFolderState("CPP.lastCustomBrowseConfiguration", undefined, workspaceFolder); + this.lastCustomBrowseConfigurationProviderId = new PersistentFolderState("CPP.lastCustomBrowseConfigurationProviderId", undefined, workspaceFolder); } this.configFolder = path.join(rootPath, ".vscode"); this.diagnosticCollection = vscode.languages.createDiagnosticCollection(rootPath); @@ -166,7 +171,7 @@ export class CppProperties { this.disposables.push(vscode.Disposable.from(this.configurationsChanged, this.selectionChanged, this.compileCommandsChanged)); } - public get ConfigurationsChanged(): vscode.Event { return this.configurationsChanged.event; } + public get ConfigurationsChanged(): vscode.Event { return this.configurationsChanged.event; } public get SelectionChanged(): vscode.Event { return this.selectionChanged.event; } public get CompileCommandsChanged(): vscode.Event { return this.compileCommandsChanged.event; } public get Configurations(): Configuration[] | undefined { return this.configurationJson ? this.configurationJson.configurations : undefined; } @@ -174,6 +179,9 @@ export class CppProperties { public get CurrentConfiguration(): Configuration | undefined { return this.Configurations ? this.Configurations[this.CurrentConfigurationIndex] : undefined; } public get KnownCompiler(): KnownCompiler[] | undefined { return this.knownCompilers; } + public get LastCustomBrowseConfiguration(): PersistentFolderState | undefined { return this.lastCustomBrowseConfiguration; } + public get LastCustomBrowseConfigurationProviderId(): PersistentFolderState | undefined { return this.lastCustomBrowseConfigurationProviderId; } + public get CurrentConfigurationProvider(): string | undefined { if (this.CurrentConfiguration?.configurationProvider) { return this.CurrentConfiguration.configurationProvider; @@ -289,7 +297,7 @@ export class CppProperties { private onConfigurationsChanged(): void { if (this.Configurations) { - this.configurationsChanged.fire(this.Configurations); + this.configurationsChanged.fire(this); } } @@ -766,17 +774,18 @@ export class CppProperties { configuration.cStandard = this.updateConfigurationString(configuration.cStandard, settings.defaultCStandard, env); configuration.cppStandard = this.updateConfigurationString(configuration.cppStandard, settings.defaultCppStandard, env); configuration.intelliSenseMode = this.updateConfigurationString(configuration.intelliSenseMode, settings.defaultIntelliSenseMode, env); - configuration.intelliSenseModeIsExplicit = true; - configuration.cStandardIsExplicit = true; - configuration.cppStandardIsExplicit = true; - configuration.compilerPathIsExplicit = true; + configuration.intelliSenseModeIsExplicit = configuration.intelliSenseModeIsExplicit || settings.defaultIntelliSenseMode !== ""; + configuration.cStandardIsExplicit = configuration.cStandardIsExplicit || settings.defaultCStandard !== ""; + configuration.cppStandardIsExplicit = configuration.cppStandardIsExplicit || settings.defaultCppStandard !== ""; + configuration.compilerPathIsExplicit = false; if (!configuration.compileCommands) { // compile_commands.json already specifies a compiler. compilerPath overrides the compile_commands.json compiler so // don't set a default when compileCommands is in use. configuration.compilerPath = this.updateConfigurationString(configuration.compilerPath, settings.defaultCompilerPath, env, true); + configuration.compilerPathIsExplicit = configuration.compilerPath !== undefined; if (configuration.compilerPath === undefined) { - configuration.compilerPathIsExplicit = false; if (!!this.defaultCompilerPath) { + // If no config value yet set for these, pick up values from the defaults, but don't consider them explicit. configuration.compilerPath = this.defaultCompilerPath; if (!configuration.cStandard && !!this.defaultCStandard) { configuration.cStandard = this.defaultCStandard; @@ -809,8 +818,10 @@ export class CppProperties { } if (configuration.compilerPath === null) { configuration.compilerPath = undefined; + configuration.compilerPathIsExplicit = true; } else if (configuration.compilerPath !== undefined) { configuration.compilerPath = util.resolveVariables(configuration.compilerPath, env); + configuration.compilerPathIsExplicit = true; } } @@ -840,25 +851,45 @@ export class CppProperties { configuration.browse.limitSymbolsToIncludedHeaders = this.updateConfigurationStringOrBoolean(configuration.browse.limitSymbolsToIncludedHeaders, settings.defaultLimitSymbolsToIncludedHeaders, env); configuration.browse.databaseFilename = this.updateConfigurationString(configuration.browse.databaseFilename, settings.defaultDatabaseFilename, env); - // If there is no c_cpp_properties.json, there are no relevant C_Cpp.default.* settings set, - // and there is only 1 registered custom config provider, default to using that provider. - const providers: CustomConfigurationProviderCollection = getCustomConfigProviders(); - if (providers.size === 1 - && !this.propertiesFile - && !settings.defaultCompilerPath - && settings.defaultCompilerPath !== "" - && !settings.defaultIncludePath - && !settings.defaultDefines - && !settings.defaultMacFrameworkPath - && settings.defaultWindowsSdkVersion === "" - && !settings.defaultForcedInclude - && settings.defaultCompileCommands === "" - && !settings.defaultCompilerArgs - && settings.defaultCStandard === "" - && settings.defaultCppStandard === "" - && settings.defaultIntelliSenseMode === "" - && settings.defaultConfigurationProvider === "") { - providers.forEach(provider => { configuration.configurationProvider = provider.extensionId; }); + if (i === this.CurrentConfigurationIndex) { + // If there is no c_cpp_properties.json, there are no relevant C_Cpp.default.* settings set, + // and there is only 1 registered custom config provider, default to using that provider. + const providers: CustomConfigurationProviderCollection = getCustomConfigProviders(); + const hasEmptyConfiguration: boolean = !this.propertiesFile + && !settings.defaultCompilerPath + && settings.defaultCompilerPath !== "" + && !settings.defaultIncludePath + && !settings.defaultDefines + && !settings.defaultMacFrameworkPath + && settings.defaultWindowsSdkVersion === "" + && !settings.defaultForcedInclude + && settings.defaultCompileCommands === "" + && !settings.defaultCompilerArgs + && settings.defaultCStandard === "" + && settings.defaultCppStandard === "" + && settings.defaultIntelliSenseMode === "" + && settings.defaultConfigurationProvider === ""; + + // Only keep a cached custom browse config if there is an emptry configuration, + // or if a specified provider ID has not changed. + let keepCachedBrowseConfig: boolean = true; + if (hasEmptyConfiguration) { + if (providers.size === 1) { + providers.forEach(provider => { configuration.configurationProvider = provider.extensionId; }); + if (this.lastCustomBrowseConfigurationProviderId !== undefined) { + keepCachedBrowseConfig = configuration.configurationProvider === this.lastCustomBrowseConfigurationProviderId.Value; + } + } else if (this.lastCustomBrowseConfigurationProviderId !== undefined + && !!this.lastCustomBrowseConfigurationProviderId.Value) { + // Use the last configuration provider we received a browse config from as the provider ID. + configuration.configurationProvider = this.lastCustomBrowseConfigurationProviderId.Value; + } + } else if (this.lastCustomBrowseConfigurationProviderId !== undefined) { + keepCachedBrowseConfig = configuration.configurationProvider === this.lastCustomBrowseConfigurationProviderId.Value; + } + if (!keepCachedBrowseConfig && this.lastCustomBrowseConfiguration !== undefined) { + this.lastCustomBrowseConfiguration.Value = undefined; + } } } @@ -1206,23 +1237,17 @@ export class CppProperties { delete (e).knownCompilers; dirty = true; } - if ((e).compilerPathIsExplicit !== undefined) { - delete (e).compilerPathIsExplicit; - dirty = true; - } - if ((e).cStandardIsExplicit !== undefined) { - delete (e).cStandardIsExplicit; - dirty = true; - } - if ((e).cppStandardIsExplicit !== undefined) { - delete (e).cppStandardIsExplicit; - dirty = true; - } - if ((e).intelliSenseModeIsExplicit !== undefined) { - delete (e).intelliSenseModeIsExplicit; + }); + + for (let i: number = 0; i < this.configurationJson.configurations.length; i++) { + if ((this.configurationJson.configurations[i].compilerPathIsExplicit !== undefined) + || (this.configurationJson.configurations[i].cStandardIsExplicit !== undefined) + || (this.configurationJson.configurations[i].cppStandardIsExplicit !== undefined) + || (this.configurationJson.configurations[i].intelliSenseModeIsExplicit !== undefined)) { dirty = true; + break; } - }); + } if (dirty) { try { @@ -1234,6 +1259,13 @@ export class CppProperties { } } + this.configurationJson.configurations.forEach(e => { + e.compilerPathIsExplicit = e.compilerPath !== undefined; + e.cStandardIsExplicit = e.cStandard !== undefined; + e.cppStandardIsExplicit = e.cppStandard !== undefined; + e.intelliSenseModeIsExplicit = e.intelliSenseMode !== undefined; + }); + } catch (err) { const failedToParse: string = localize("failed.to.parse.properties", 'Failed to parse "{0}"', this.propertiesFile.fsPath); vscode.window.showErrorMessage(`${failedToParse}: ${err.message}`); @@ -1847,10 +1879,46 @@ export class CppProperties { } private writeToJson(): void { + // Set aside IsExplicit values, and restore them after writing. + const savedCompilerPathIsExplicit: boolean[] = []; + const savedCStandardIsExplicit: boolean[] = []; + const savedCppStandardIsExplicit: boolean[] = []; + const savedIntelliSenseModeIsExplicit: boolean[] = []; + + if (this.configurationJson) { + this.configurationJson.configurations.forEach(e => { + savedCompilerPathIsExplicit.push(!!e.compilerPathIsExplicit); + if (e.compilerPathIsExplicit !== undefined) { + delete e.compilerPathIsExplicit; + } + savedCStandardIsExplicit.push(!!e.cStandardIsExplicit); + if (e.cStandardIsExplicit !== undefined) { + delete e.cStandardIsExplicit; + } + savedCppStandardIsExplicit.push(!!e.cppStandardIsExplicit); + if (e.cppStandardIsExplicit !== undefined) { + delete e.cppStandardIsExplicit; + } + savedIntelliSenseModeIsExplicit.push(!!e.intelliSenseModeIsExplicit); + if (e.intelliSenseModeIsExplicit !== undefined) { + delete e.intelliSenseModeIsExplicit; + } + }); + } + console.assert(this.propertiesFile); if (this.propertiesFile) { fs.writeFileSync(this.propertiesFile.fsPath, jsonc.stringify(this.configurationJson, null, 4)); } + + if (this.configurationJson) { + for (let i: number = 0; i < this.configurationJson.configurations.length; i++) { + this.configurationJson.configurations[i].compilerPathIsExplicit = savedCompilerPathIsExplicit[i]; + this.configurationJson.configurations[i].cStandardIsExplicit = savedCStandardIsExplicit[i]; + this.configurationJson.configurations[i].cppStandardIsExplicit = savedCppStandardIsExplicit[i]; + this.configurationJson.configurations[i].intelliSenseModeIsExplicit = savedIntelliSenseModeIsExplicit[i]; + } + } } public checkCppProperties(): void { diff --git a/Extension/src/common.ts b/Extension/src/common.ts index 6cd186eff6..3d5bc68f9c 100644 --- a/Extension/src/common.ts +++ b/Extension/src/common.ts @@ -257,19 +257,19 @@ export function isUri(input: any): input is vscode.Uri { } export function isString(input: any): input is string { - return typeof(input) === "string"; + return typeof (input) === "string"; } export function isNumber(input: any): input is number { - return typeof(input) === "number"; + return typeof (input) === "number"; } export function isBoolean(input: any): input is boolean { - return typeof(input) === "boolean"; + return typeof (input) === "boolean"; } export function isObject(input: any): input is object { - return typeof(input) === "object"; + return typeof (input) === "object"; } export function isArray(input: any): input is any[] { @@ -288,7 +288,7 @@ export function isOptionalArrayOfString(input: any): input is string[] | undefin return input === undefined || isArrayOfString(input); } -export function resolveCachePath(input: string | undefined, additionalEnvironment: {[key: string]: string | string[]}): string { +export function resolveCachePath(input: string | undefined, additionalEnvironment: { [key: string]: string | string[] }): string { let resolvedPath: string = ""; if (!input) { // If no path is set, return empty string to language service process, where it will set the default path as @@ -301,7 +301,7 @@ export function resolveCachePath(input: string | undefined, additionalEnvironmen return resolvedPath; } -export function resolveVariables(input: string | undefined, additionalEnvironment?: {[key: string]: string | string[]}): string { +export function resolveVariables(input: string | undefined, additionalEnvironment?: { [key: string]: string | string[] }): string { if (!input) { return ""; } @@ -981,7 +981,8 @@ export function extractCompilerPathAndArgs(inputCompilerPath?: string, inputComp if (compilerPath) { if (compilerPathLowercase?.endsWith("\\cl.exe") || compilerPathLowercase?.endsWith("/cl.exe") || (compilerPathLowercase === "cl.exe") - || compilerPathLowercase?.endsWith("\\cl") || compilerPathLowercase?.endsWith("/cl") || (compilerPathLowercase === "cl")) { compilerName = path.basename(compilerPath); + || compilerPathLowercase?.endsWith("\\cl") || compilerPathLowercase?.endsWith("/cl") || (compilerPathLowercase === "cl")) { + compilerName = path.basename(compilerPath); } else if (compilerPath.startsWith("\"")) { // Input has quotes around compiler path const endQuote: number = compilerPath.substr(1).search("\"") + 1; @@ -1049,7 +1050,7 @@ export function escapeForSquiggles(s: string): string { newResults += "\\"; } lastWasBackslash = false; - lastBackslashWasEscaped = false; + lastBackslashWasEscaped = false; newResults += s[i]; } } @@ -1142,6 +1143,13 @@ export function getLocalizedString(params: LocalizeStringParams): string { return indent + text; } +export function getLocalizedSymbolScope(scope: string, detail: string): string { + return localize({ + key: "c.cpp.symbolscope.separator", comment: + ["{0} is an untranslated C++ keyword (e.g. \"private\") and {1} is either another keyword (e.g. \"typedef\") or a localized property (e.g. a localized verison of \"declaration\""] + }, "{0}, {1}", scope, detail); +} + function decodeUCS16(input: string): number[] { const output: number[] = []; let counter: number = 0; diff --git a/Extension/walkthrough/buildtask/build-project-linux.md b/Extension/walkthrough/buildtask/build-project-linux.md deleted file mode 100644 index ed23badac4..0000000000 --- a/Extension/walkthrough/buildtask/build-project-linux.md +++ /dev/null @@ -1,13 +0,0 @@ -# Build your C++ file with GCC on Linux - -1. Open the C++ source file that you want to build. Make sure this file is active (currently displayed and selected) in the editor. - -2. From the main menu, select **Terminal > Configure Default Build Task...** - -3. Choose **C/C++: g++ build active file.** - - ![Dropdown showing C++ build tasks for GCC on Linux](linux-build-active-file.png) - -4. To run the build task, press `Ctrl+Shift+B` or from the **Terminal** main menu choose **Run Build Task.** - - > **Note**: Make sure your C++ source file is active (currently displayed and selected) in the editor when running the build task, because the build task builds the active file. \ No newline at end of file diff --git a/Extension/walkthrough/buildtask/build-project-mac.md b/Extension/walkthrough/buildtask/build-project-mac.md deleted file mode 100644 index 8d84f268a8..0000000000 --- a/Extension/walkthrough/buildtask/build-project-mac.md +++ /dev/null @@ -1,13 +0,0 @@ -# Build your C++ file with Clang on macOS - -1. Open the C++ source file that you want to build. Make sure this file is active (currently displayed and selected) in the editor. - -2. From the main menu, select **Terminal > Configure Default Build Task...** - -3. Choose **C/C++: clang++ build active file.** - - ![Dropdown showing C++ build tasks for Clang on macOS](clang-default-build-task.png) - -4. To run the build task, press `Cmd+Shift+B` or from the **Terminal** main menu choose **Run Build Task.** - - > **Note**: Make sure your C++ source file is active (currently displayed and selected) in the editor when running the build task, because the build task builds the active file. \ No newline at end of file diff --git a/Extension/walkthrough/buildtask/build-project-windows.md b/Extension/walkthrough/buildtask/build-project-windows.md deleted file mode 100644 index e12456a695..0000000000 --- a/Extension/walkthrough/buildtask/build-project-windows.md +++ /dev/null @@ -1,15 +0,0 @@ -# Build your C++ file with MSVC (cl.exe) on Windows - -1. Open the C++ source file that you want to build. Make sure this file is active (currently displayed and selected) in the editor. - -2. From the main menu, select **Terminal > Configure Default Build Task...** - -3. Choose **C/C++: cl.exe build active file.** - - ![Dropdown showing C++ build tasks for cl.exe on Windows](msvc-build-active-file.png) - - > **Note**: You must open VS Code from the **Developer Command Prompt for VS** in order for VS Code to find cl.exe on your system. - -4. To run the build task, press `Ctrl+Shift+B` or from the **Terminal** main menu choose **Run Build Task.** - - > **Note**: Make sure your C++ source file is active (currently displayed and selected) in the editor when running the build task, because the build task builds the active file. \ No newline at end of file diff --git a/Extension/walkthrough/buildtask/clang-default-build-task.png b/Extension/walkthrough/buildtask/clang-default-build-task.png deleted file mode 100644 index 806f15ede3..0000000000 Binary files a/Extension/walkthrough/buildtask/clang-default-build-task.png and /dev/null differ diff --git a/Extension/walkthrough/buildtask/linux-build-active-file.png b/Extension/walkthrough/buildtask/linux-build-active-file.png deleted file mode 100644 index 507d653fd8..0000000000 Binary files a/Extension/walkthrough/buildtask/linux-build-active-file.png and /dev/null differ diff --git a/Extension/walkthrough/buildtask/msvc-build-active-file.png b/Extension/walkthrough/buildtask/msvc-build-active-file.png deleted file mode 100644 index 3fa9c02b0f..0000000000 Binary files a/Extension/walkthrough/buildtask/msvc-build-active-file.png and /dev/null differ diff --git a/Extension/walkthrough/debugconfig/clang-build-and-debug-active-file.png b/Extension/walkthrough/debugconfig/clang-build-and-debug-active-file.png deleted file mode 100644 index 8168de6703..0000000000 Binary files a/Extension/walkthrough/debugconfig/clang-build-and-debug-active-file.png and /dev/null differ diff --git a/Extension/walkthrough/debugconfig/linux-build-and-debug-active-file.png b/Extension/walkthrough/debugconfig/linux-build-and-debug-active-file.png deleted file mode 100644 index 540d9f32c5..0000000000 Binary files a/Extension/walkthrough/debugconfig/linux-build-and-debug-active-file.png and /dev/null differ diff --git a/Extension/walkthrough/debugconfig/msvc-build-and-debug-active-file.png b/Extension/walkthrough/debugconfig/msvc-build-and-debug-active-file.png deleted file mode 100644 index 1816ad2573..0000000000 Binary files a/Extension/walkthrough/debugconfig/msvc-build-and-debug-active-file.png and /dev/null differ diff --git a/Extension/walkthrough/debugconfig/run-and-debug-project-linux.md b/Extension/walkthrough/debugconfig/run-and-debug-project-linux.md index 19890b4f75..5c8dcbda9c 100644 --- a/Extension/walkthrough/debugconfig/run-and-debug-project-linux.md +++ b/Extension/walkthrough/debugconfig/run-and-debug-project-linux.md @@ -1,13 +1,15 @@ # Run and debug your C++ file on Linux +To run and debug your C++ file in VS Code: + 1. Open the C++ source file that you want to run and debug. Make sure this file is active (currently displayed and selected) in the editor. -2. From the main menu, select **Run > Add Configuration...** and choose **C++ (GDB/LLDB)**. +2. Press `F5`. Or, from the main menu, choose **Run > Start Debugging**. -3. Choose **g++ build and debug active file.** +3. Select **C++ (GDB/LLDB)**. - ![Dropdown showing C++ debug configurations for GCC on Linux](linux-build-and-debug-active-file.png) +4. Choose **g++ - Build and debug active file**. -4. To start a debugging session, press `F5` or from the main menu choose **Run > Start Debugging**. +After running and debugging your C++ file for the first time, you'll notice two new files inside your project's **.vscode** folder: **tasks.json** and **launch.json**. - > **Note**: Make sure your C++ source file is active (currently displayed and selected) in the editor when you start a debugging session. \ No newline at end of file +For more complex build and debug scenarios, you can customize your build tasks and debug configurations in tasks.json and launch.json. For example, if you normally pass arguments to your compiler when building from the command line, you can specify those arguments in tasks.json using the **compilerArgs** property. Similarly, you can define arguments to pass to your program for debugging in launch.json. \ No newline at end of file diff --git a/Extension/walkthrough/debugconfig/run-and-debug-project-mac.md b/Extension/walkthrough/debugconfig/run-and-debug-project-mac.md index cb4560e74e..b49a3eef73 100644 --- a/Extension/walkthrough/debugconfig/run-and-debug-project-mac.md +++ b/Extension/walkthrough/debugconfig/run-and-debug-project-mac.md @@ -1,13 +1,15 @@ # Run and debug your C++ file on macOS +To run and debug your C++ file in VS Code: + 1. Open the C++ source file that you want to run and debug. Make sure this file is active (currently displayed and selected) in the editor. -2. From the main menu, select **Run > Add Configuration...** and choose **C++ (GDB/LLDB)**. +2. Press `F5`. Or, from the main menu, choose **Run > Start Debugging**. -3. Choose **clang++ build and debug active file.** +3. Select **C++ (GDB/LLDB)**. - ![Dropdown showing C++ debug configurations for Clang on macOS](clang-build-and-debug-active-file.png) +4. Choose **clang++ - Build and debug active file**. -4. To start a debugging session, press `F5` or from the main menu choose **Run > Start Debugging**. +After running and debugging your C++ file for the first time, you'll notice two new files inside your project's **.vscode** folder: **tasks.json** and **launch.json**. - > **Note**: Make sure your C++ source file is active (currently displayed and selected) in the editor when you start a debugging session. \ No newline at end of file +For more complex build and debug scenarios, you can customize your build tasks and debug configurations in tasks.json and launch.json. For example, if you normally pass arguments to your compiler when building from the command line, you can specify those arguments in tasks.json using the **compilerArgs** property. Similarly, you can define arguments to pass to your program for debugging in launch.json. diff --git a/Extension/walkthrough/debugconfig/run-and-debug-project-windows.md b/Extension/walkthrough/debugconfig/run-and-debug-project-windows.md index 4e90d0da61..3d106bf4d9 100644 --- a/Extension/walkthrough/debugconfig/run-and-debug-project-windows.md +++ b/Extension/walkthrough/debugconfig/run-and-debug-project-windows.md @@ -1,13 +1,15 @@ # Run and debug your C++ file on Windows +To run and debug your C++ file in VS Code: + 1. Open the C++ source file that you want to run and debug. Make sure this file is active (currently displayed and selected) in the editor. -2. From the main menu, select **Run > Add Configuration...** and choose **C++ (Windows)**. +2. Press `F5`. Or, from the main menu, choose **Run > Start Debugging**. -3. Choose **cl.exe build and debug active file.** +3. Select **C++ (Windows)**. - ![Dropdown showing C++ debug configurations for MSVC on Windows](msvc-build-and-debug-active-file.png) +4. Choose **cl.exe - Build and debug active file**. -4. To start a debugging session, press `F5` or from the main menu choose **Run > Start Debugging**. +After running and debugging your C++ file for the first time, you'll notice two new files inside your project's **.vscode** folder: **tasks.json** and **launch.json**. - > **Note**: Make sure your C++ source file is active (currently displayed and selected) in the editor when you start a debugging session. \ No newline at end of file +For more complex build and debug scenarios, you can customize your build tasks and debug configurations in tasks.json and launch.json. For example, if you normally pass arguments to your compiler when building from the command line, you can specify those arguments in tasks.json using the **compilerArgs** property. Similarly, you can define arguments to pass to your program for debugging in launch.json.