GraphicalDebugging extension for Visual Studio Code
This extension allows to display graphical representation of variables during debugging.
You can download this extension from Visual Studio Marketplace or GitHub.
array
, deque
, list
, span
, vector
array
static_vector
, vector
varray
duration
duration
quantity
complex
, pair
box
, linestring
, multi_linestring
, multi_point
, multi_polygon
, point
, point_xy
, point_xyz
, polygon
, ring
, segment
point_data
, polygon_data
, polygon_with_holes_data
, rectangle_data
, segment_data
Array
deque
, list
dllist
, sllist
array
tuple
GeometryCollection
, LinearRing
, LineString
, MultiLineString
, MultiPoint
, MultiPolygon
, Point
, Polygon
Point2D
, Polygon
, Segment2D
Array
CAPIPointImpl
, CAPILineImpl
, CAPILineStringImpl
, CAPILinearRingImpl
, CAPIPolygonImpl
, CAPIMultiPointImpl
, CAPIMultiLineStringImpl
, CAPIMultiPolygonImpl
, BoundingBox
You can define your types in *.json
files which can be placed e.g. in the workspace. The following file defines Point
C++ type containing x
and y
members.
{
"name": "graphicaldebugging",
"language": "cpp",
"types": [
{
"type": "Point",
"kind": "point",
"coordinates": {
"x": "$this.x",
"y": "$this.y"
}
}
]
}
For more examples see *.json
files here.
The directory containing user files can be defined in settings, by default it is the workspace directory of currently debugged program.
GDB and LLDB debuggers don't report original C++ types for variables created from type alias/typedef but original types are needed for this extension to work correctly. Fortunately the implementation of this proposal allows to unroll the types automatically.
If you choose to define aliases manually, e.g. automatic unrolling doesn't work for you, you can do it in the same *.json
files as described above. For example the following aliases:
namespace bg = boost::geometry;
using point_t = bg::model::point<double, 2, bg::cs::cartesian>;
using polygon_t = bg::model::polygon<point_t>;
could be defined as follows:
{
"name": "graphicaldebugging",
"language": "cpp",
"aliases": [
{
"name": "point_t",
"type": "boost::geometry::model::point<double,2,boost::geometry::cs::cartesian>"
},
{
"name": "polygon_t",
"type": "boost::geometry::model::polygon<boost::geometry::model::point<double,2,boost::geometry::cs::cartesian>,true,true,std::vector,std::vector,std::allocator,std::allocator>"
}
]
}