Type: Bug
Description
When using the Microsoft C/C++ extension, opening newly created .cpp files in my C++ project causes cpptools-srv.exe to rapidly consume system memory.
On a machine with 32 GB RAM, system memory quickly reaches 99%, causing the whole system to become extremely slow or nearly unresponsive.
After uninstalling the Microsoft C/C++ extension, the issue disappears. Opening and switching between the same newly created .cpp files no longer causes the memory spike.
This strongly suggests that the issue is caused by cpptools-srv.exe / the C/C++ extension's IntelliSense or parsing behavior.
Steps to Reproduce
- Install Microsoft C/C++ extension
ms-vscode.cpptools.
- Open a C++ project in VS Code.
- Create a new
.cpp file in the project.
- Open the newly created
.cpp file.
- Switch between this new
.cpp file and another .cpp file.
- Observe Windows Task Manager.
Expected Result
Opening or switching between C++ files should not cause excessive memory usage. VS Code and the system should remain responsive.
Actual Result
cpptools-srv.exe rapidly increases memory usage. System memory reaches 99% on a 32 GB RAM machine. The system becomes extremely slow or nearly unresponsive.
In one occurrence, my wireless mouse stopped responding until I unplugged and replugged the USB receiver into another USB port. Codex also crashed afterwards with the following error, likely because the system was out of memory:
(code=3221226505, signal=null)
Most recent error: memory allocation of 225072 bytes failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Extension version: 1.32.2
VS Code version: Code 1.119.0 (8b640eef5a6c6089c029249d48efa5c99adf7d51, 2026-05-05T11:23:50-07:00)
OS version: Windows_NT x64 10.0.26200
Modes:
<details>
<summary>System Info</summary>
|Item|Value|
|---|---|
|CPUs|AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16 x 3793)|
|GPU Status|2d_canvas: enabled<br>GPU0: VENDOR= 0x1002, DEVICE=0x15bf [AMD Radeon 780M Graphics], DRIVER_VENDOR=AMD, DRIVER_VERSION=32.0.31007.1017 *ACTIVE*<br>GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8328<br>Machine model name: <br>Machine model version: <br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>trees_in_viz: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled<br>webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|31.22GB (20.76GB free)|
|Process Argv|D:\\CGMB --crash-reporter-id e779c159-232b-42af-9584-e297d63d4cb0|
|Screen Reader|no|
|VM|0%|
</details><details>
<summary>A/B Experiments</summary>
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsactivate1:31505457
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_c_966_ss:31454199
inlinechat_v2_hd992725:31505030
4je02754:31466945
8hhj4413:31478653
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
test_treatment2:31471001
46204921:31447328
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
chat:31457767
7e187181:31503455
ghj88844:31499326
ec1eg703:31491645
ddid_t:31478206
1b2f8594:31509479
getcmakediagnosticsoff:31489825
7df3h592:31512476
cp_cls_c_1082:31504161
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_c_632:31510883
852d2892:31506239
748c7209:31512887
j7be3939_tst_off:31511780
32d76977:31512328
ha629193:31508444
539gd155_c:31506875
e6ac6c27:31509471
</details>
<!-- generated by issue reporter -->
Type: Bug
Description
When using the Microsoft C/C++ extension, opening newly created
.cppfiles in my C++ project causescpptools-srv.exeto rapidly consume system memory.On a machine with 32 GB RAM, system memory quickly reaches 99%, causing the whole system to become extremely slow or nearly unresponsive.
After uninstalling the Microsoft C/C++ extension, the issue disappears. Opening and switching between the same newly created
.cppfiles no longer causes the memory spike.This strongly suggests that the issue is caused by
cpptools-srv.exe/ the C/C++ extension's IntelliSense or parsing behavior.Steps to Reproduce
ms-vscode.cpptools..cppfile in the project..cppfile..cppfile and another.cppfile.Expected Result
Opening or switching between C++ files should not cause excessive memory usage. VS Code and the system should remain responsive.
Actual Result
cpptools-srv.exerapidly increases memory usage. System memory reaches 99% on a 32 GB RAM machine. The system becomes extremely slow or nearly unresponsive.In one occurrence, my wireless mouse stopped responding until I unplugged and replugged the USB receiver into another USB port. Codex also crashed afterwards with the following error, likely because the system was out of memory:
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsactivate1:31505457
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_c_966_ss:31454199
inlinechat_v2_hd992725:31505030
4je02754:31466945
8hhj4413:31478653
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
test_treatment2:31471001
46204921:31447328
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
chat:31457767
7e187181:31503455
ghj88844:31499326
ec1eg703:31491645
ddid_t:31478206
1b2f8594:31509479
getcmakediagnosticsoff:31489825
7df3h592:31512476
cp_cls_c_1082:31504161
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_c_632:31510883
852d2892:31506239
748c7209:31512887
j7be3939_tst_off:31511780
32d76977:31512328
ha629193:31508444
539gd155_c:31506875
e6ac6c27:31509471