From fdc2bcf8a2f1fb7fae9a9735034130a60a18e506 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 8 Sep 2026 08:44:09 -0700 Subject: [PATCH 1/6] Update changelog and version for 1.34.4. (#14748) --- Extension/CHANGELOG.md | 57 ++++++++++++++---------------------------- Extension/package.json | 2 +- 2 files changed, 20 insertions(+), 39 deletions(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 139f89cfc..916422e20 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,61 +1,42 @@ # C/C++ for Visual Studio Code Changelog -## Version 1.34.3: September 4, 2026 -### Enhancement +## Version 1.34.4: September 9, 2026 +### Enhancements +* Add folding support for C++ `public`, `private`, and `protected` access sections. [#14645](https://github.com/microsoft/vscode-cpptools/issues/14645) + * Thanks for the contribution. [@8prashant (Prashant Kumar Rai)](https://github.com/8prashant) [PR #14675](https://github.com/microsoft/vscode-cpptools/pull/14675) * Add the `processFilter` launch option to filter or automatically select processes for remote `cppdbg` attach configurations. [#14682](https://github.com/microsoft/vscode-cpptools/issues/14682) * Thanks for the contribution. [@afreof (Adrian Freihofer)](https://github.com/afreof) [PR #14684](https://github.com/microsoft/vscode-cpptools/pull/14684) +* Improve workspace indexing performance and reduce memory usage by deduplicating browse paths from `compile_commands.json`, excluding unrelated files from the browse database, and avoiding unnecessary tag parsing of non-included extensionless files. [#14693](https://github.com/microsoft/vscode-cpptools/issues/14693) +* Improve C/C++ file classification by supporting extensionless headers and additional extensions such as `.hip` throughout extension features. [PR #14711](https://github.com/microsoft/vscode-cpptools/pull/14711) +* Update the bundled `clang-tidy` and `clang-format` from 22.1.3 to 23.1.0, including available `clang-tidy` check suggestions and documentation. [PR #14713](https://github.com/microsoft/vscode-cpptools/pull/14713) +* Reduce language server memory usage and RPC overhead for large messages and browse database snapshots. +* Add IntelliSense support for C23 `_BitInt`, C++26 pack indexing, and C++26 structured binding packs. ### Bug Fixes * Fix 'C/C++: Edit Configurations (UI)' not fully respecting custom theme colors. [#11263](https://github.com/microsoft/vscode-cpptools/issues/11263) * Thanks for the contribution. [@8prashant (Prashant Kumar Rai)](https://github.com/8prashant) [PR #14692](https://github.com/microsoft/vscode-cpptools/pull/14692) +* Fix formatting not inserting the final newline requested by `InsertNewlineAtEOF`. [#12680](https://github.com/microsoft/vscode-cpptools/issues/12680) +* Fix inactive code being dimmed from the wrong column when a preprocessor directive is preceded by a comment. [#12882](https://github.com/microsoft/vscode-cpptools/issues/12882) + * Thanks for the contribution. [@8prashant (Prashant Kumar Rai)](https://github.com/8prashant) [PR #14666](https://github.com/microsoft/vscode-cpptools/pull/14666) * Fix 'Run/Debug C/C++ File' buttons being hidden when `C_Cpp.intelliSenseEngine` is set to `disabled`. [#13001](https://github.com/microsoft/vscode-cpptools/issues/13001) * Thanks for the contribution. [@8prashant (Prashant Kumar Rai)](https://github.com/8prashant) [PR #14719](https://github.com/microsoft/vscode-cpptools/pull/14719) +* Fix nested quoted `#include` directives failing to resolve source-relative headers when `-iquote` paths are used. [#13606](https://github.com/microsoft/vscode-cpptools/issues/13606) * Fix false IntelliSense errors for EnTT multi-component views caused by heterogeneous `auto` non-type template parameter packs. [#14456](https://github.com/microsoft/vscode-cpptools/issues/14456) * Fix false IntelliSense errors for GNU ARM stack-pointer clobbers, including CMSIS `__set_PSP` and `__set_MSP`. [#14486](https://github.com/microsoft/vscode-cpptools/issues/14486) -* Fix false IntelliSense errors for constrained hidden friend function templates that use `requires` expressions. [#14696](https://github.com/microsoft/vscode-cpptools/issues/14696) -* Fix compiler and include paths from some custom configuration providers being ignored. [#14724](https://github.com/microsoft/vscode-cpptools/issues/14724) -* Fix a `cpptools-srv2` crash when tag parsing a C macro that stringizes `__VA_OPT__`. -* Various localization updates. -* Update dependencies. - -## Version 1.34.2: August 31, 2026 -### Enhancements -* Improve C/C++ file classification by supporting extensionless headers and additional extensions such as `.hip` throughout extension features. [PR #14711](https://github.com/microsoft/vscode-cpptools/pull/14711) -* Update the bundled `clang-tidy` and `clang-format` from 22.1.3 to 23.1.0, including available `clang-tidy` check suggestions and documentation. [PR #14713](https://github.com/microsoft/vscode-cpptools/pull/14713) - -### Bug Fixes -* Fix high CPU and memory usage in workspaces with multiple symbolic links that point to ancestor directories. [#14689](https://github.com/microsoft/vscode-cpptools/issues/14689) -* Fix include completion and symbol navigation using stale recursive include data after files are replaced by directories or symbolic link roots change. -* Fix 'Find All References' misclassifying references in inactive preprocessor regions after falling back to header-only IntelliSense. - -## Version 1.34.1: August 28, 2026 -### Bug Fixes -* Fix formatting not inserting the final newline requested by `InsertNewlineAtEOF`. [#12680](https://github.com/microsoft/vscode-cpptools/issues/12680) -* Fix nested quoted `#include` directives failing to resolve source-relative headers when `-iquote` paths are used. [#13606](https://github.com/microsoft/vscode-cpptools/issues/13606) * Fix incorrect semantic highlighting for explicit function template specializations. [#14491](https://github.com/microsoft/vscode-cpptools/issues/14491) * Fix IntelliSense using `c17` instead of GCC's default GNU C language standard. [#14560](https://github.com/microsoft/vscode-cpptools/issues/14560) -* Fix unnecessary IntelliSense reparsing after unrelated settings changes and incorrect language updates after `files.associations` changes. -* Fix custom C/C++ `files.associations` entries with certain non-ASCII characters being ignored on Windows. -* Fix `cpptools-srv` crashes under memory pressure while reading or processing RPC messages. - -## Version 1.34.0: August 25, 2026 -### Enhancements -* Add folding support for C++ `public`, `private`, and `protected` access sections. [#14645](https://github.com/microsoft/vscode-cpptools/issues/14645) - * Thanks for the contribution. [@8prashant (Prashant Kumar Rai)](https://github.com/8prashant) [PR #14675](https://github.com/microsoft/vscode-cpptools/pull/14675) -* Improve workspace indexing performance and reduce memory usage by deduplicating browse paths from `compile_commands.json`, excluding unrelated files from the browse database, and avoiding unnecessary tag parsing of non-included extensionless files. [#14693](https://github.com/microsoft/vscode-cpptools/issues/14693) -* Reduce language server memory usage and RPC overhead for large messages and browse database snapshots. -* Add IntelliSense support for C23 `_BitInt`, C++26 pack indexing, and C++26 structured binding packs. - -### Bug Fixes -* Fix inactive code being dimmed from the wrong column when a preprocessor directive is preceded by a comment. [#12882](https://github.com/microsoft/vscode-cpptools/issues/12882) - * Thanks for the contribution. [@8prashant (Prashant Kumar Rai)](https://github.com/8prashant) [PR #14666](https://github.com/microsoft/vscode-cpptools/pull/14666) * Fix enum member completion in a `switch` label before the trailing `:`. [#14605](https://github.com/microsoft/vscode-cpptools/issues/14605) * Fix extension crashes caused by events communicating with the language client before it is ready. [PR #14617](https://github.com/microsoft/vscode-cpptools/pull/14617) * Fix configuration path diagnostics for paths containing regular expression metacharacters and for incorrect source ranges. [PR #14674](https://github.com/microsoft/vscode-cpptools/pull/14674), [PR #14679](https://github.com/microsoft/vscode-cpptools/pull/14679) * Prevent browse database crashes on filesystems that do not support SQLite WAL shared memory, and warn when no compatible database location is available. [PR #14683](https://github.com/microsoft/vscode-cpptools/pull/14683) -* Fix runaway CPU and memory usage caused by cyclic document symbol data, and prevent `cpptools` from remaining active after VS Code exits. [#14689](https://github.com/microsoft/vscode-cpptools/issues/14689) +* Fix runaway CPU and memory usage in workspaces with cyclic document symbol data or multiple symbolic links that point to ancestor directories, and prevent `cpptools` from remaining active after VS Code exits. [#14689](https://github.com/microsoft/vscode-cpptools/issues/14689) +* Fix false IntelliSense errors for constrained hidden friend function templates that use `requires` expressions. [#14696](https://github.com/microsoft/vscode-cpptools/issues/14696) +* Fix include completion and symbol navigation using stale recursive include data after files are replaced by directories or symbolic link roots change. +* Fix unnecessary IntelliSense reparsing after unrelated settings changes and incorrect language updates after `files.associations` changes. +* Fix 'Find All References' misclassifying references in inactive preprocessor regions after falling back to header-only IntelliSense. * Fix several language server crashes during startup, shutdown, diagnostic processing, and concurrent code model updates. * Fix various IntelliSense completion, navigation, false error, code analysis, formatting, and colorization issues. +* Fix custom C/C++ `files.associations` entries with certain non-ASCII characters being ignored on Windows. * Fix a potential language server deadlock caused by inconsistent lock ordering. * Harden temporary file storage on Linux and macOS. * Various localization updates. diff --git a/Extension/package.json b/Extension/package.json index 51d701cf8..1285065c1 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -2,7 +2,7 @@ "name": "cpptools", "displayName": "C/C++", "description": "C/C++ IntelliSense, debugging, and code browsing.", - "version": "1.34.3-main", + "version": "1.34.4-main", "publisher": "ms-vscode", "icon": "LanguageCCPP_color_128x.png", "readme": "README.md", From fda9db5c79a4400795e6716c4a5a30bf553caea6 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 8 Sep 2026 10:04:21 -0700 Subject: [PATCH 2/6] Enable PR CI for release and insiders (#14751) --- .github/workflows/ci_linux.yml | 2 +- .github/workflows/ci_mac.yml | 2 +- .github/workflows/ci_windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index 3b6761ce4..2ee2b69ef 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -4,7 +4,7 @@ on: push: branches: [ main ] pull_request: - branches: [ main ] + branches: [ main, release, insiders ] workflow_dispatch: inputs: target-ref: diff --git a/.github/workflows/ci_mac.yml b/.github/workflows/ci_mac.yml index 04a7ce613..61a845d47 100644 --- a/.github/workflows/ci_mac.yml +++ b/.github/workflows/ci_mac.yml @@ -4,7 +4,7 @@ on: push: branches: [ main ] pull_request: - branches: [ main ] + branches: [ main, release, insiders ] workflow_dispatch: inputs: target-ref: diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index fb75c2673..4507a0745 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -4,7 +4,7 @@ on: push: branches: [ main ] pull_request: - branches: [ main ] + branches: [ main, release, insiders ] workflow_dispatch: inputs: target-ref: From b798b0263234ba3863978a9aa9a1a76c63c6eb46 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 8 Sep 2026 16:12:36 -0700 Subject: [PATCH 3/6] Fix localization string import (#14743) * Fix localization string import * Correct conversion cycle translations --- Extension/.scripts/import_edge_strings.ts | 2 +- Extension/bin/messages/cs/messages.json | 2 +- Extension/bin/messages/de/messages.json | 2 +- Extension/bin/messages/es/messages.json | 2 +- Extension/bin/messages/fr/messages.json | 2 +- Extension/bin/messages/it/messages.json | 2 +- Extension/bin/messages/ja/messages.json | 2 +- Extension/bin/messages/ko/messages.json | 2 +- Extension/bin/messages/pl/messages.json | 2 +- Extension/bin/messages/pt-br/messages.json | 2 +- Extension/bin/messages/ru/messages.json | 2 +- Extension/bin/messages/tr/messages.json | 2 +- Extension/bin/messages/zh-cn/messages.json | 2 +- Extension/bin/messages/zh-tw/messages.json | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Extension/.scripts/import_edge_strings.ts b/Extension/.scripts/import_edge_strings.ts index f9b172bea..d0b2e43cc 100644 --- a/Extension/.scripts/import_edge_strings.ts +++ b/Extension/.scripts/import_edge_strings.ts @@ -47,7 +47,7 @@ export async function main() { for (const locFolderName of locFolderNames) { const languageInfo = languages.find(l => l.folderName === locFolderName); if (!languageInfo) { - return; + continue; } const localePath = path.join(localizeRepoPath, locFolderName); const lclPaths = await glob("vc/vc/cpfeui.dll.lcl", { cwd: localePath, nocase: true, nodir: true }); diff --git a/Extension/bin/messages/cs/messages.json b/Extension/bin/messages/cs/messages.json index 9904fc76b..f2ec27691 100644 --- a/Extension/bin/messages/cs/messages.json +++ b/Extension/bin/messages/cs/messages.json @@ -2999,7 +2999,7 @@ "Přiřazení k anachronizmu this není kompatibilní s režimem C++11.", "Došlo k neznámé chybě. Soubor PCH IntelliSense se nevygeneroval.", "Nejméně jednu ze vzdálených cest nejde namapovat na stávající místní cesty. Funkce IntelliSense možná nebude fungovat zcela podle očekávání.", - "too many nested user-defined conversions (possible cycle of converting routines)", + "Příliš mnoho vnořených uživatelsky definovaných převodů (možný cyklus převodních rutin)", null, null, null, diff --git a/Extension/bin/messages/de/messages.json b/Extension/bin/messages/de/messages.json index 5f16c7396..26c553580 100644 --- a/Extension/bin/messages/de/messages.json +++ b/Extension/bin/messages/de/messages.json @@ -2999,7 +2999,7 @@ "Die Zuweisung zum this-Anachronismus ist mit dem C++11-Modus nicht kompatibel.", "Unbekannter Fehler. Es wurde keine IntelliSense PCH-Datei generiert.", "Mindestens ein Remotepfad kann vorhandenen lokalen Pfaden nicht zugeordnet werden. Die IntelliSense-Funktionen werden ggf. beeinträchtigt.", - "too many nested user-defined conversions (possible cycle of converting routines)", + "zu viele geschachtelte benutzerdefinierte Konvertierungen (möglicher Zyklus von Konvertierungsroutinen)", null, null, null, diff --git a/Extension/bin/messages/es/messages.json b/Extension/bin/messages/es/messages.json index d56dad249..1780f12c7 100644 --- a/Extension/bin/messages/es/messages.json +++ b/Extension/bin/messages/es/messages.json @@ -2999,7 +2999,7 @@ "la asignación al anacronismo \"this\" no es compatible con el modo C++11", "error desconocido. No se generó un archivo IntelliSense PCH.", "No se pueden asignar una o varias rutas remotas a las rutas locales actuales. La experiencia con IntelliSense puede degradarse.", - "too many nested user-defined conversions (possible cycle of converting routines)", + "demasiadas conversiones anidadas definidas por el usuario (posible ciclo de rutinas de conversión)", null, null, null, diff --git a/Extension/bin/messages/fr/messages.json b/Extension/bin/messages/fr/messages.json index 8ac6a7f15..126273175 100644 --- a/Extension/bin/messages/fr/messages.json +++ b/Extension/bin/messages/fr/messages.json @@ -2999,7 +2999,7 @@ "l'assignation à l'anachronisme 'this' n'est pas compatible avec le mode C++11", "une erreur inconnue s'est produite. Aucun fichier PCH IntelliSense n'a été généré.", "Impossible de mapper un ou plusieurs chemins distants à des chemins locaux existants. L'expérience IntelliSense risque d'être dégradée.", - "too many nested user-defined conversions (possible cycle of converting routines)", + "trop de conversions imbriquées définies par l’utilisateur(-trice) (cycle possible des routines de conversion)", null, null, null, diff --git a/Extension/bin/messages/it/messages.json b/Extension/bin/messages/it/messages.json index b1b5c9160..82f75976e 100644 --- a/Extension/bin/messages/it/messages.json +++ b/Extension/bin/messages/it/messages.json @@ -2999,7 +2999,7 @@ "l'assegnazione all'anacronismo 'this' non è compatibile con la modalità C++11", "si è verificato un errore sconosciuto. Non è stato generato alcun file PCH IntelliSense.", "Non è possibile eseguire il mapping di uno o più percorsi remoti a percorsi locali esistenti. L'operazione potrebbe influire negativamente sull'esperienza IntelliSense.", - "too many nested user-defined conversions (possible cycle of converting routines)", + "troppe conversioni annidate definite dall'utente (possibile ciclo di routine di conversione)", null, null, null, diff --git a/Extension/bin/messages/ja/messages.json b/Extension/bin/messages/ja/messages.json index 812631db1..fa9d10284 100644 --- a/Extension/bin/messages/ja/messages.json +++ b/Extension/bin/messages/ja/messages.json @@ -2999,7 +2999,7 @@ "'this' への代入 (旧形式) は C++11 モードと互換性がありません", "不明なエラーが発生しました。IntelliSense PCH ファイルは生成されませんでした。", "1 つ以上のリモート パスを既存のローカル パスにマップできません。IntelliSense の機能が低下する可能性があります。", - "too many nested user-defined conversions (possible cycle of converting routines)", + "入れ子になったユーザー定義変換が多すぎます (変換ルーチンの可能なサイクル)", null, null, null, diff --git a/Extension/bin/messages/ko/messages.json b/Extension/bin/messages/ko/messages.json index 76d2b027f..828b00b6b 100644 --- a/Extension/bin/messages/ko/messages.json +++ b/Extension/bin/messages/ko/messages.json @@ -2999,7 +2999,7 @@ "'this'에 대한 할당(오래된 구문)은 C++11 모드와 호환되지 않습니다.", "알 수 없는 오류가 발생했습니다. IntelliSense PCH 파일이 생성되지 않았습니다.", "하나 이상의 원격 경로를 기존 로컬 경로에 매핑할 수 없습니다. IntelliSense 성능이 저하될 수 있습니다.", - "too many nested user-defined conversions (possible cycle of converting routines)", + "중첩된 사용자 정의 변환이 너무 많음(변환 루틴의 순환이 발생할 수 있음).", null, null, null, diff --git a/Extension/bin/messages/pl/messages.json b/Extension/bin/messages/pl/messages.json index 6220ec7b9..bf5161221 100644 --- a/Extension/bin/messages/pl/messages.json +++ b/Extension/bin/messages/pl/messages.json @@ -2999,7 +2999,7 @@ "przypisanie do przestarzałej konstrukcji „this” nie jest zgodne z trybem C++11", "wystąpił nieznany błąd. Nie wygenerowano pliku PCH funkcji IntelliSense.", "Nie można zamapować co najmniej jednej ścieżki zdalnej na istniejące ścieżki lokalne. Może to mieć negatywny wpływ na działanie funkcji IntelliSense.", - "too many nested user-defined conversions (possible cycle of converting routines)", + "zbyt wiele zagnieżdżonych konwersji zdefiniowanych przez użytkownika (możliwy cykl procedur konwersji)", null, null, null, diff --git a/Extension/bin/messages/pt-br/messages.json b/Extension/bin/messages/pt-br/messages.json index fce5fa707..0b732be7f 100644 --- a/Extension/bin/messages/pt-br/messages.json +++ b/Extension/bin/messages/pt-br/messages.json @@ -2999,7 +2999,7 @@ "a atribuição ao anacronismo 'this' não é compatível com o modo C++11", "erro desconhecido. Não foi gerado um arquivo PCH do IntelliSense.", "Um ou mais caminhos remotos não podem ser mapeados para os caminhos locais existentes. A experiência do IntelliSense pode ser degradada.", - "too many nested user-defined conversions (possible cycle of converting routines)", + "muitas conversões aninhadas definidas pelo usuário (possível ciclo de rotinas de conversão)", null, null, null, diff --git a/Extension/bin/messages/ru/messages.json b/Extension/bin/messages/ru/messages.json index 441f8aaa0..7e3072f00 100644 --- a/Extension/bin/messages/ru/messages.json +++ b/Extension/bin/messages/ru/messages.json @@ -2999,7 +2999,7 @@ "назначение устаревшему элементу this несовместимо с режимом C++11", "произошла неизвестная ошибка. PCH-файл IntelliSense не был создан.", "Один или несколько удаленных путей не могут быть сопоставлены с существующими локальными путями. Использование IntelliSense может быть ограничено.", - "too many nested user-defined conversions (possible cycle of converting routines)", + "слишком много вложенных пользовательских преобразований (возможен цикл процедур преобразования)", null, null, null, diff --git a/Extension/bin/messages/tr/messages.json b/Extension/bin/messages/tr/messages.json index 342484290..d04768feb 100644 --- a/Extension/bin/messages/tr/messages.json +++ b/Extension/bin/messages/tr/messages.json @@ -2999,7 +2999,7 @@ "'this' anakronizmine yönelik atama C++11 modu ile uyumlu değil", "bilinmeyen bir hata oluştu. IntelliSense PCH dosyası oluşturulmadı.", "Bir veya daha fazla uzak yol, mevcut yerel yollarla eşlenemiyor. IntelliSense deneyimi bozulabilir.", - "too many nested user-defined conversions (possible cycle of converting routines)", + "Çok fazla iç içe kullanıcı tanımlı dönüştürme var (dönüştürme yordamlarının olası döngüsü)", null, null, null, diff --git a/Extension/bin/messages/zh-cn/messages.json b/Extension/bin/messages/zh-cn/messages.json index c85651ecc..2818c6b89 100644 --- a/Extension/bin/messages/zh-cn/messages.json +++ b/Extension/bin/messages/zh-cn/messages.json @@ -2999,7 +2999,7 @@ "对 \"this\" 计时错误的赋值与 C++11 模式不兼容", "出现了未知错误。未生成 IntelliSense PCH 文件。", "一个或多个远程路径无法映射到现有本地路径。IntelliSense 体验可能会降级。", - "too many nested user-defined conversions (possible cycle of converting routines)", + "嵌套的用户定义转换过多(可能存在转换例程循环)", null, null, null, diff --git a/Extension/bin/messages/zh-tw/messages.json b/Extension/bin/messages/zh-tw/messages.json index 76d49b38b..1af9e0f9f 100644 --- a/Extension/bin/messages/zh-tw/messages.json +++ b/Extension/bin/messages/zh-tw/messages.json @@ -2999,7 +2999,7 @@ "'this' 用法已過時,且這種指派與 C++11 模式不相容", "發生未知的錯誤。未產生 IntelliSense PCH 檔案。", "有一或多個遠端路徑無法對應到現有的本機路徑。IntelliSense 的效能可能會變差。", - "too many nested user-defined conversions (possible cycle of converting routines)", + "巢狀的使用者定義轉換太多 (轉換常式可能形成循環)", null, null, null, From 01aa09c053722406d4c42009a1f88d76fcd982e0 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Tue, 8 Sep 2026 16:13:22 -0700 Subject: [PATCH 4/6] Add Run and Debug session state tests (#14736) --- .../tests/buildAndDebug.test.ts | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Extension/test/scenarios/SingleRootProject/tests/buildAndDebug.test.ts b/Extension/test/scenarios/SingleRootProject/tests/buildAndDebug.test.ts index 9f84df5e8..22182b48c 100644 --- a/Extension/test/scenarios/SingleRootProject/tests/buildAndDebug.test.ts +++ b/Extension/test/scenarios/SingleRootProject/tests/buildAndDebug.test.ts @@ -4,10 +4,25 @@ * ------------------------------------------------------------------------------------------ */ import * as assert from 'assert'; +import * as fs from 'fs'; import { suite, test } from 'mocha'; +import * as os from 'os'; +import * as path from 'path'; import * as vscode from 'vscode'; import { updateBuildAndDebugSessionState } from '../../../../src/Debugger/extension'; import { SessionState } from '../../../../src/sessionState'; +import * as testHelpers from '../../../common/testHelpers'; + +async function assertSessionState(isSourceFile: boolean, isFolderOpen: boolean): Promise { + const timeout: number = Date.now() + 1000; + while (Date.now() < timeout && + (SessionState.buildAndDebugIsSourceFile.get() !== isSourceFile || + SessionState.buildAndDebugIsFolderOpen.get() !== isFolderOpen)) { + await testHelpers.delay(10); + } + assert.strictEqual(SessionState.buildAndDebugIsSourceFile.get(), isSourceFile); + assert.strictEqual(SessionState.buildAndDebugIsFolderOpen.get(), isFolderOpen); +} suite("BuildAndDebug SessionState Tests", () => { test("updateBuildAndDebugSessionState sets false when editor is undefined", () => { @@ -41,6 +56,40 @@ suite("BuildAndDebug SessionState Tests", () => { assert.strictEqual(SessionState.buildAndDebugIsFolderOpen.get(), true); }); + test("updateBuildAndDebugSessionState tracks an external C/C++ source file", () => { + const workspaceFolder = vscode.workspace.workspaceFolders?.[0] ?? assert.fail("No workspace folder available"); + const mockEditor: any = { + document: { + uri: vscode.Uri.joinPath(workspaceFolder.uri, "..", "external.cpp"), + languageId: "cpp" + } + }; + updateBuildAndDebugSessionState(mockEditor); + assert.strictEqual(SessionState.buildAndDebugIsSourceFile.get(), true); + assert.strictEqual(SessionState.buildAndDebugIsFolderOpen.get(), false); + }); + + test("active document language changes update session state", async () => { + const temporaryDirectory: string = await fs.promises.mkdtemp(path.join(os.tmpdir(), "cpptools-build-and-debug-")); + const sourceUri: vscode.Uri = vscode.Uri.file(path.join(temporaryDirectory, "external.cpp")); + await fs.promises.writeFile(sourceUri.fsPath, "int main() { return 0; }\n"); + + try { + let document: vscode.TextDocument = await vscode.workspace.openTextDocument(sourceUri); + await vscode.window.showTextDocument(document); + await assertSessionState(true, false); + + document = await vscode.languages.setTextDocumentLanguage(document, "plaintext"); + await assertSessionState(false, true); + + await vscode.languages.setTextDocumentLanguage(document, "cpp"); + await assertSessionState(true, false); + } finally { + await vscode.commands.executeCommand("workbench.action.closeActiveEditor"); + await fs.promises.rm(temporaryDirectory, { recursive: true, force: true }); + } + }); + test("updateBuildAndDebugSessionState sets false for C/C++ header file", () => { const workspaceFolder = vscode.workspace.workspaceFolders?.[0] ?? assert.fail("No workspace folder available"); const mockEditor: any = { From 1054963b0a11bd165aeb7268545899194f463e10 Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Wed, 9 Sep 2026 12:00:53 -0700 Subject: [PATCH 5/6] Update changelog and version for 1.35.0 (#14755) --- Extension/CHANGELOG.md | 11 +++++++++++ Extension/package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Extension/CHANGELOG.md b/Extension/CHANGELOG.md index 916422e20..1d3ad7e28 100644 --- a/Extension/CHANGELOG.md +++ b/Extension/CHANGELOG.md @@ -1,5 +1,16 @@ # C/C++ for Visual Studio Code Changelog +## Version 1.35.0: September 10, 2026 +### Enhancement +* Improve workspace indexing performance. + +### Bug Fixes +* Fix false IntelliSense errors when initializing a variable with a value from the same unnamed enum. [#14726](https://github.com/microsoft/vscode-cpptools/issues/14726) +* Fix the workspace parsing status briefly reporting completion while a newer parse is still running. +* Fix 'Create Declaration/Definition' incorrectly being offered for explicit template instantiations. +* Fix tag parser hangs when database initialization fails or shutdown interrupts a pending request. +* Various localization updates. + ## Version 1.34.4: September 9, 2026 ### Enhancements * Add folding support for C++ `public`, `private`, and `protected` access sections. [#14645](https://github.com/microsoft/vscode-cpptools/issues/14645) diff --git a/Extension/package.json b/Extension/package.json index 1285065c1..38df2d105 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -2,7 +2,7 @@ "name": "cpptools", "displayName": "C/C++", "description": "C/C++ IntelliSense, debugging, and code browsing.", - "version": "1.34.4-main", + "version": "1.35.0-main", "publisher": "ms-vscode", "icon": "LanguageCCPP_color_128x.png", "readme": "README.md", From 945b05bf6044d95fd6525d733e8c4e7887d1227d Mon Sep 17 00:00:00 2001 From: Sean McManus Date: Wed, 9 Sep 2026 12:01:41 -0700 Subject: [PATCH 6/6] Retry session-state test cleanup on Windows (#14756) --- .../scenarios/SingleRootProject/tests/buildAndDebug.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/test/scenarios/SingleRootProject/tests/buildAndDebug.test.ts b/Extension/test/scenarios/SingleRootProject/tests/buildAndDebug.test.ts index 22182b48c..64152f114 100644 --- a/Extension/test/scenarios/SingleRootProject/tests/buildAndDebug.test.ts +++ b/Extension/test/scenarios/SingleRootProject/tests/buildAndDebug.test.ts @@ -86,7 +86,7 @@ suite("BuildAndDebug SessionState Tests", () => { await assertSessionState(true, false); } finally { await vscode.commands.executeCommand("workbench.action.closeActiveEditor"); - await fs.promises.rm(temporaryDirectory, { recursive: true, force: true }); + await fs.promises.rm(temporaryDirectory, { recursive: true, force: true, maxRetries: 10, retryDelay: 100 }); } });