开发者

Tutorial/Manual how to create Visualizer in autoexp.dat

I have some C++ datatypes for which I would like to improve the debugging experience in my team. I therefore want to create a custom visualizer in the autoexp.dat file. The [AutoExpand] section doesn't s开发者_运维问答eem sufficient, so I started to look at [Visualizer]. I found this website with some explanations, but is there any comprehensive reference/manual/tutorial? I don't get the difference between $c and $e, for example. I already succeeded in displaying some basic information, but I feel like there's so much more to know...

Do you know any good resource?

Thanks!


Appears this is already commented above but someone coming to this question would not necessarily read the comments and so might miss the great tutorial available on the boost site:

https://svn.boost.org/trac/boost/wiki/DebuggerVisualizers

Also

http://mariusbancila.ro/blog/2007/04/06/tweaking-autoexpdat-for-custom-types-in-vs2005/

http://www.idigitalhouse.com/Blog/?p=83

http://www.chromium.org/developers/how-tos/how-to-set-up-visual-studio-debugger-visualizers

http://www.virtualdub.org/blog/pivot/entry.php?id=172


Below is an example of visualizer for boost::tuple. It should be fairly easy to follow:

boost::tuples::tuple<*>{
    ; Show as (11, 22, 33, ... })
    preview (
        #(
            "("
            , $e.head
            , ", "
            , $e.tail.head
            , ", "
            , $e.tail.tail.head
            , ", "
            , $e.tail.tail.tail.head
            , ", "
            , $e.tail.tail.tail.tail.head
            , ", "
            , $e.tail.tail.tail.tail.tail.head
            , ", "
            , $e.tail.tail.tail.tail.tail.tail.head
            , ", "
            , $e.tail.tail.tail.tail.tail.tail.tail.head
            , ", "
            , $e.tail.tail.tail.tail.tail.tail.tail.tail.head
            , ", "
            , $e.tail.tail.tail.tail.tail.tail.tail.tail.tail.head
            , ")"
        )
    )   
    children (
        #(
            0: $e.head
            , 1: $e.tail.head
            , 2: $e.tail.tail.head
            , 3: $e.tail.tail.tail.head
            , 4: $e.tail.tail.tail.tail.head
            , 5: $e.tail.tail.tail.tail.tail.head
            , 6: $e.tail.tail.tail.tail.tail.tail.head
            , 7: $e.tail.tail.tail.tail.tail.tail.tail.head
            , 8: $e.tail.tail.tail.tail.tail.tail.tail.tail.head
            , 9: $e.tail.tail.tail.tail.tail.tail.tail.tail.tail.head
        )
    )
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜