Skip to content

Commit

Permalink
Add MSVS visualizers for wxArrayString, wxVector, wxWindowList.
Browse files Browse the repository at this point in the history
Make viewing the contents of the (most common) container types easier when
debugging in MSVS 2012 or later.

Provide std::{vector,list}-like visualizers for wxVector and wxWindowList and
a special visualizer allowing to see the contents of wxArrayString in a
relatively common case when it has just or two elements.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
  • Loading branch information
vadz committed Jun 14, 2014
1 parent 40e3379 commit 30856fd
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions misc/msvc/wxWidgets.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,46 @@ http://code.msdn.microsoft.com/windowsdesktop/Writing-type-visualizers-2eae77a2#
<Type Name="wxULongLong">
<DisplayString>{m_ll}</DisplayString>
</Type>

<Type Name="wxArrayString">
<DisplayString Condition="m_nCount==0">empty</DisplayString>
<DisplayString Condition="m_nCount==1">{m_pItems[0]}</DisplayString>
<DisplayString Condition="m_nCount==2">{m_pItems[0]} and {m_pItems[1]}</DisplayString>
<DisplayString>size={m_nCount}: {m_pItems[0]}, {m_pItems[1]}, ...</DisplayString>
<Expand>
<ArrayItems>
<Size>m_nCount</Size>
<ValuePointer>m_pItems</ValuePointer>
</ArrayItems>
</Expand>
</Type>

<!--
Defining visualizer for wxListBase is not really useful, so do it for
the most commonly used "concrete" list type.
-->
<Type Name="wxWindowList">
<DisplayString>size={m_count}</DisplayString>
<Expand>
<Item Name="[size]">m_count</Item>
<LinkedListItems>
<Size>m_count</Size>
<HeadPointer>m_nodeFirst</HeadPointer>
<NextPointer>m_next</NextPointer>
<ValueNode>(wxWindow*)m_data</ValueNode>
</LinkedListItems>
</Expand>
</Type>

<Type Name="wxVector&lt;*&gt;">
<DisplayString>size={m_size}</DisplayString>
<Expand>
<Item Name="[size]">m_size</Item>
<Item Name="[capacity]">m_capacity</Item>
<ArrayItems>
<Size>m_size</Size>
<ValuePointer>m_values</ValuePointer>
</ArrayItems>
</Expand>
</Type>
</AutoVisualizer>

0 comments on commit 30856fd

Please sign in to comment.