-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
natvis visualizers for BStr and BString
Closes #1
- Loading branch information
1 parent
91f0aea
commit 47e41bf
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> | ||
|
||
<!-- These could be simplified with a `x,bstr` format specifier. However, that doesn't appear to be supported by VS Code? --> | ||
|
||
<Type Name="winstr::bstring::danger::BStr"> | ||
<DisplayString>{(wchar_t*)&__0,[((unsigned int *)&__0)[-1] / 2]su}</DisplayString> | ||
<Expand> | ||
<Item Name="[len]" >((unsigned int *)&__0)[-1] / 2</Item> | ||
<Item Name="[bytes]" >((unsigned int *)&__0)[-1]</Item> | ||
<Item Name="[code units]" >(wchar_t*)&__0,[((unsigned int *)&__0)[-1] / 2]su</Item> | ||
</Expand> | ||
</Type> | ||
|
||
<Type Name="winstr::bstring::danger::BString"> | ||
<DisplayString>{(wchar_t*)__0.pointer,[((unsigned int *)__0.pointer)[-1] / 2]su}</DisplayString> | ||
<Expand> | ||
<Item Name="[len]" >((unsigned int *)__0.pointer)[-1] / 2</Item> | ||
<Item Name="[bytes]" >((unsigned int *)__0.pointer)[-1]</Item> | ||
<Item Name="[code units]" >(wchar_t*)__0.pointer,[((unsigned int *)__0.pointer)[-1] / 2]su</Item> | ||
</Expand> | ||
</Type> | ||
|
||
</AutoVisualizer> |