If you add a CMap or CArray variable into the debugger VC2005, all you get is the raw data structure of these containers, namely raw pointers, buckets, raw hash tables... Not very useful info for debugging! To get around this limitation you can edit the file "autoexp.dat" found in:
\Program Files\Microsoft Visual Studio 8\Common7\Packages\Debugger
and add support to any type (even custom types/classes defined by yourself), e.g.:
Code: Select all
;------------------------------------------------------------------------------
; CArray
;------------------------------------------------------------------------------
CArray<*>|CDWordArray|CWordArray|CByteArray|CUIntArray|CPtrArray|CObArray|CStringArray{
preview
(
#( "[", [$c.m_nSize], "](",
#array
(
expr : $c.m_pData[$i],
size : $c.m_nSize
),
")")
)
children
(
#(
#array
(
expr : $c.m_pData[$i],
size : $c.m_nSize
)
)
)
}