[boost] Graphical debugging extension for VS2015 (Container, Geometry, Polygon, Variant, ...)

54 views
Skip to first unread message

Adam Wulkiewicz

unread,
Sep 15, 2015, 9:15:41 PM9/15/15
to bo...@lists.boost.org
Hi,

For some time now I've been thinking about extending the capabilities of
a debugger and to visualize data in more convenient way than the raw
numbers. It's obvious to me that in many cases variables could be
graphically visualized, in many cases this is the "natural"
representation, this would greately simplify the debugging. I haven't
found anything like it so I've decided to play with the VS2015
extensions, mostly because they're easy to write. This is what I came up
with (see the readme):

https://github.com/awulkiew/graphical-debugging

Besides adding commonly used native visualizers for types from some
Boost libraries it allows to display their graphical representation. The
extension support Boost.Geometry models and other types used internally
in this library, Boost.Polygon models (polygon_set_data is missing) and
boost::variant storing geometries. As a bonus, it's possible to watch
containers of values (some STL containers as well as boost::array and
contiguous containers from Boost.Container) as charts.

Maybe if there were enough interest it'd be worth to extend it and/or to
add to the official VS extensions gallery. I'm a Boost.Geometry
developer so in the future I plan to support all of the coordinate
systems supported by the library, maybe other internals and basically
anything that helps me with the development. But I can imagine that
variables of types from various Boost libraries could also be
visualized, e.g. Polygon's voronoi diagram and internals, Math's
quaternions as 3D Axis-Angle, std::complex as a point on a plane,
containers of complex numbers and in general arbitrary types represented
somehow as a 1D, 2D or 3D objects, CircularBuffer e.g. as a pie chart,
BGL's graphs, maybe GIL's images, Interprocess' shared memory blocks?,
etc. So feel free to share suggestions and contribute if you like.

Regards,
Adam



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Ion Gaztañaga

unread,
Sep 16, 2015, 12:56:30 PM9/16/15
to bo...@lists.boost.org
On 16/09/2015 3:15, Adam Wulkiewicz wrote:
> Hi,
>
> For some time now I've been thinking about extending the capabilities of
> a debugger and to visualize data in more convenient way than the raw
> numbers. It's obvious to me that in many cases variables could be
> graphically visualized, in many cases this is the "natural"
> representation, this would greately simplify the debugging. I haven't
> found anything like it so I've decided to play with the VS2015
> extensions, mostly because they're easy to write. This is what I came up
> with (see the readme):
>
> https://github.com/awulkiew/graphical-debugging

Adam, this is awesome. I think we should somehow standardize those
visualizers in Boost. Maybe another Boost library could be the answer,
including pretty-printers for GDB. Any visualizer or pretty-printer
expert in the community?

This could be also a really useful project for GSOC.

Best,

Ion

Adam Wulkiewicz

unread,
Sep 16, 2015, 4:27:32 PM9/16/15
to bo...@lists.boost.org
Ion Gaztañaga wrote:
> On 16/09/2015 3:15, Adam Wulkiewicz wrote:
>> Hi,
>>
>> For some time now I've been thinking about extending the capabilities of
>> a debugger and to visualize data in more convenient way than the raw
>> numbers. It's obvious to me that in many cases variables could be
>> graphically visualized, in many cases this is the "natural"
>> representation, this would greately simplify the debugging. I haven't
>> found anything like it so I've decided to play with the VS2015
>> extensions, mostly because they're easy to write. This is what I came up
>> with (see the readme):
>>
>> https://github.com/awulkiew/graphical-debugging
>
> Adam, this is awesome. I think we should somehow standardize those
> visualizers in Boost. Maybe another Boost library could be the answer,
> including pretty-printers for GDB. Any visualizer or pretty-printer
> expert in the community?
>

Some time ago I also have written QtCreator debugging helpers for types
I needed to debug:

https://github.com/awulkiew/debugging-helpers

They require QtCreator so cannot be used directly with GDB but on the
other hand should work with all debuggers compatible with QtCreator.

There are only some third-party visualizers for VS2012+ mentioned here:

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

I guess Boost community could maintain a library containing such
additions. Writing the visualizers is easier for VS2012+ than it was in
the past. Now for instance you simply have to add them into the project.
I don't think we need to support older versions. If each maintainer
wrote a single natvis file for types from his library we'd have the
whole Boost covered in a week, and AFAIK this would work with 3 latest
versions of VS.

> This could be also a really useful project for GSOC.

Are you talking about visualizers or the VS extension?

Actually in both cases I agree. Regarding the extension, for now the
graphical visualization is hardcoded. I can imagine that it could be
tweakable the same way as native visualizers are. A user could write
some XML file defining how a variable should be visualized, etc. This
would be very useful in particular for libraries where concepts play an
important role so basically a user can use any type he/she wants. And
there are more issues in this extension that could be addressed. I also
thought about writing a plugin for QtCreator doing the same thing as the
VS2015 one but I got an impression that it requires more attention than
VS extension. My point is that in general it would be nice to support
several different IDEs, debuggers, etc. If only there was enough free
time...

Regards,
Adam

Adam Wulkiewicz

unread,
Sep 28, 2015, 7:58:42 PM9/28/15
to bo...@lists.boost.org
Adam Wulkiewicz wrote:
> Hi,
>
> For some time now I've been thinking about extending the capabilities
> of a debugger and to visualize data in more convenient way than the
> raw numbers. It's obvious to me that in many cases variables could be
> graphically visualized, in many cases this is the "natural"
> representation, this would greately simplify the debugging. I haven't
> found anything like it so I've decided to play with the VS2015
> extensions, mostly because they're easy to write. This is what I came
> up with (see the readme):
>
> https://github.com/awulkiew/graphical-debugging

FYI, I implemented the support for geographic and spherical equatorial
coordinate systems for Boost.Geometry models.
See the readme for an example.

Adam Wulkiewicz

unread,
Sep 29, 2015, 9:56:31 AM9/29/15
to bo...@lists.boost.org
Adam Wulkiewicz wrote:
> Adam Wulkiewicz wrote:
>> Hi,
>>
>> For some time now I've been thinking about extending the capabilities
>> of a debugger and to visualize data in more convenient way than the
>> raw numbers. It's obvious to me that in many cases variables could be
>> graphically visualized, in many cases this is the "natural"
>> representation, this would greately simplify the debugging. I haven't
>> found anything like it so I've decided to play with the VS2015
>> extensions, mostly because they're easy to write. This is what I came
>> up with (see the readme):
>>
>> https://github.com/awulkiew/graphical-debugging
>
> FYI, I implemented the support for geographic and spherical equatorial
> coordinate systems for Boost.Geometry models.
> See the readme for an example.

For convenience:
https://visualstudiogallery.msdn.microsoft.com/4b81868b-8901-408f-a28e-25a6580788fb

Mathieu Champlon

unread,
Sep 29, 2015, 11:04:16 AM9/29/15
to bo...@lists.boost.org
On 29/09/2015 15:56, Adam Wulkiewicz wrote:
>
> For convenience:
> https://visualstudiogallery.msdn.microsoft.com/4b81868b-8901-408f-a28e-25a6580788fb

Hi,

I believe this is a neat idea, thanks for implementing this !

MAT.
Reply all
Reply to author
Forward
0 new messages