Tutorial/Manual how to create Visualizer in autoexp.dat

后端 未结 2 1660
我在风中等你
我在风中等你 2020-12-28 08:45

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

相关标签:
2条回答
  • 2020-12-28 08:50

    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

    0 讨论(0)
  • 2020-12-28 08:58

    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 讨论(0)
提交回复
热议问题