Type: Bug
The C++ Expression Evaluator will enforce the natvis complexity limit during expansion, at least for trees (ex: std::map). So any collection with a non-trivial number of elements will not format correctly if they key and/or value of the collection has an associated natvis rule.
A similar bug has been reported and fixed in Visual Studio, but the fix has not been applied to the cpptools extension in vscode.
Repro steps:
natvisrepro.zip
- Unzip and open the attached folder.
- Debug with the default configuration.
- When the debugger stops at the
__debugbreak() call, expand foo in the variables view.
Expected result: 100 elements are shown, each having a key and value.
Actual result: Only ~50 keys are shown, and no values are shown. Missing keys are shown as [] and missing values shown as (, ).
Extension version: 1.31.4
VS Code version: Code 1.116.0 (560a9dba96f961efea7b1612916f89e5d5d4d679, 2026-04-15T00:28:13Z)
OS version: Windows_NT x64 10.0.26100
Modes:
System Info
| Item |
Value |
| CPUs |
13th Gen Intel(R) Core(TM) i9-13950HX (32 x 2419) |
| GPU Status |
2d_canvas: enabled GPU0: VENDOR= 0x10de, DEVICE=0x2717 [NVIDIA GeForce RTX 4090 Laptop GPU], DRIVER_VENDOR=NVIDIA, DRIVER_VERSION=32.0.15.8160 ACTIVE GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.7309 Machine model name: Machine model version: direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off trees_in_viz: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) |
undefined |
| Memory (System) |
63.77GB (36.98GB free) |
| Process Argv |
|
| Screen Reader |
no |
| VM |
0% |
Type: Bug
The C++ Expression Evaluator will enforce the natvis complexity limit during expansion, at least for trees (ex:
std::map). So any collection with a non-trivial number of elements will not format correctly if they key and/or value of the collection has an associated natvis rule.A similar bug has been reported and fixed in Visual Studio, but the fix has not been applied to the cpptools extension in vscode.
Repro steps:
natvisrepro.zip
__debugbreak()call, expandfooin the variables view.Expected result: 100 elements are shown, each having a key and value.
Actual result: Only ~50 keys are shown, and no values are shown. Missing keys are shown as
[]and missing values shown as(, ).Extension version: 1.31.4
VS Code version: Code 1.116.0 (560a9dba96f961efea7b1612916f89e5d5d4d679, 2026-04-15T00:28:13Z)
OS version: Windows_NT x64 10.0.26100
Modes:
System Info
GPU0: VENDOR= 0x10de, DEVICE=0x2717 [NVIDIA GeForce RTX 4090 Laptop GPU], DRIVER_VENDOR=NVIDIA, DRIVER_VERSION=32.0.15.8160 ACTIVE
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.7309
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off