Open yh-sb opened 3 years ago
Issue Type: Bug
Format specifier ,s doesn't work.
,s
How to reproduce
#include <string>
int main() { std::string string("test");
return 0;
}
2. Use the following natvis entity: ```xml <Type Name="std::string"> <AlternativeType Name="std::__cxx11::basic_string<*>"/> <DisplayString>{_M_dataplus._M_p,s}</DisplayString> <Expand> <Item Name="size">_M_string_length</Item> <Item Name="capacity" Condition="_M_dataplus._M_p == _M_local_buf">sizeof(_M_local_buf)</Item> <Item Name="capacity" Condition="_M_dataplus._M_p != _M_local_buf">_M_allocated_capacity</Item> <Item Name="string">_M_dataplus._M_p,s</Item> </Expand> </Type>
<DisplayString>
<Item Name="string">
Actual result:
Expected result: string = "test" (without leading address)
string = "test"
Extension version: 1.5.0-insiders2 VS Code version: Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48, 2021-06-17T13:28:07.755Z) OS version: Windows_NT x64 10.0.17763 Restricted Mode: No
@WardenGnaw Any comment on this?
Still reproducible on v1.8.3.
Must be an issue in https://github.com/microsoft/MIEngine/blob/main/src/MIDebugEngine/Natvis.Impl/Natvis.cs
Issues is still present in vscode 1.76.0 with cpptools v1.14.1.
Issue Type: Bug
Format specifier
,s
doesn't work.How to reproduce
int main() { std::string string("test");
}
,s
format specifier in<DisplayString>
and<Item Name="string">
doesn't change anything in debug view, hover and showDisplayString.Actual result:
Expected result:
string = "test"
(without leading address)Extension version: 1.5.0-insiders2 VS Code version: Code 1.57.1 (507ce72a4466fbb27b715c3722558bb15afa9f48, 2021-06-17T13:28:07.755Z) OS version: Windows_NT x64 10.0.17763 Restricted Mode: No
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (8 x 1992)| |GPU Status|2d_canvas: enabledgpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|15.85GB (8.96GB free)| |Process Argv|--locale=en --crash-reporter-id c8510ba5-736a-4465-9c29-9471122a68c5| |Screen Reader|no| |VM|0%|
A/B Experiments
``` vsliv368:30146709 vsreu685:30147344 python383:30185418 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyt639:30300192 pythontb:30283811 pythonvspyt551cf:30311713 vspre833:30321513 pythonptprofiler:30281270 vshan820:30294714 pythondataviewer:30285071 vscus158:30321503 pythonvsuse255cf:30323309 vscorehov:30309549 vscod805cf:30301675 pythonvspyt200:30324779 binariesv615:30325510 ```