Graphical debugging extension for VS2015 (Container, Geometry, Polygon, Variant, ...)
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
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):
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
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):
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 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):
FYI, I implemented the support for geographic and spherical equatorial coordinate systems for Boost.Geometry models. See the readme for an example. Regards, Adam
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):
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-25a65...
On 29/09/2015 15:56, Adam Wulkiewicz wrote:
For convenience: https://visualstudiogallery.msdn.microsoft.com/4b81868b-8901-408f-a28e-25a65...
Hi, I believe this is a neat idea, thanks for implementing this ! MAT.
participants (3)
-
Adam Wulkiewicz
-
Ion Gaztañaga
-
Mathieu Champlon