How to see std :: map contents in Visual C ++ .NET (Visual Studio 2003) during debugging?

I need to see the contents of the std :: map variable during debugging. However, if I click on it in the "Auto / Locale" tab, I will see specific things for implementation, not the keys and its contents that I want to look at. I have no job?

+3
source share
2 answers

At the moment I do not have VS2003. But you can try adding the following section to "autoexp.dat" (I was sure that sections for all standard types were already included in VS2003):

;------------------------------------------------------------------------------
;  std::map
;------------------------------------------------------------------------------

std::map<*>{
    children
    (
        #tree
        (
            head : $c._Myhead->_Parent, 
            skip : $c._Myhead, 
            size : $c._Mysize, 
            left : _Left, 
            right : _Right
        ) : $e._Myval
    )

    preview
    (
        #(
            "[", 
            $e._Mysize, 
            "](", 

            #tree
            (
                head : $c._Myhead->_Parent, 
                skip : $c._Myhead, 
                size : $c._Mysize, 
                left : _Left, 
                right : _Right
            ) : $e._Myval,

            ")"
        )
    )            
}

autoexp Visual Studio . Visual Studio

+1

Visual Studio 2003 , VS2008 2010, . , STL 2003 , , .

, Visual ++ 2008 Express, , .

+2

Source: https://habr.com/ru/post/1739807/


All Articles