├── images
├── plot_watch.png
├── natvis_watch.png
├── geometry_watch.png
├── graphical_watch.png
├── plot_watch_zoom.png
├── geometry_watch_sph.png
├── plot_watch_various.png
├── plot_watch_zoomed.png
├── geometry_watch_zoom.png
├── geometry_watch_zoomed.png
├── graphical_debugging.png
└── graphical_watch_sph.png
├── solution
├── GraphicalDebugging
│ ├── icon.ico
│ ├── preview.png
│ ├── Resources
│ │ ├── plot.ico
│ │ ├── geometry.ico
│ │ ├── graphical.ico
│ │ ├── PlotWatchCommand.png
│ │ ├── GeometriesWatchCommand.png
│ │ └── GraphicalWatchCommand.png
│ ├── BoostArray.natvis
│ ├── BoostCircularBuffer.natvis
│ ├── LoadingWindow.xaml.cs
│ ├── LICENSE.txt
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── LoadingWindow.xaml
│ ├── GeometryWatchOptionPage.cs
│ ├── BoostContainer.natvis
│ ├── PlotWatch.cs
│ ├── GeometryWatch.cs
│ ├── GraphicalWatch.cs
│ ├── BoostPolygon.natvis
│ ├── BoostMPL.natvis
│ ├── PlotWatchOptionPage.cs
│ ├── source.extension.vsixmanifest
│ ├── GeneralOptionControl.cs
│ ├── GeneralOptionPage.cs
│ ├── PlotWatchCommand.cs
│ ├── GeometryWatchCommand.cs
│ ├── GraphicalWatchCommand.cs
│ ├── VariableItem.cs
│ ├── GraphicalDebuggingPackage.cs
│ ├── GraphicalWatchOptionPage.cs
│ ├── GeneralOptionControl.resx
│ ├── Colors.cs
│ ├── ExpressionLoader_Std.cs
│ ├── VSPackage.resx
│ ├── GeneralOptionControl.Designer.cs
│ ├── BoostGeometry.natvis
│ ├── GraphicalDebuggingPackage.vsct
│ ├── BoostTuple.natvis
│ ├── GraphicalWatchControl.xaml
│ ├── GraphicalDebugging.csproj
│ ├── ExpressionLoader_Util.cs
│ ├── Debugger.cs
│ ├── ClassScopeExpression.cs
│ ├── release_notes.txt
│ └── PlotWatchControl.xaml
└── GraphicalDebugging.sln
├── .gitignore
├── examples
├── sfml.xml
├── cs.xml
└── cpp.xml
├── LICENSE.txt
└── README.md
/images/plot_watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/plot_watch.png
--------------------------------------------------------------------------------
/images/natvis_watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/natvis_watch.png
--------------------------------------------------------------------------------
/images/geometry_watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/geometry_watch.png
--------------------------------------------------------------------------------
/images/graphical_watch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/graphical_watch.png
--------------------------------------------------------------------------------
/images/plot_watch_zoom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/plot_watch_zoom.png
--------------------------------------------------------------------------------
/images/geometry_watch_sph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/geometry_watch_sph.png
--------------------------------------------------------------------------------
/images/plot_watch_various.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/plot_watch_various.png
--------------------------------------------------------------------------------
/images/plot_watch_zoomed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/plot_watch_zoomed.png
--------------------------------------------------------------------------------
/images/geometry_watch_zoom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/geometry_watch_zoom.png
--------------------------------------------------------------------------------
/images/geometry_watch_zoomed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/geometry_watch_zoomed.png
--------------------------------------------------------------------------------
/images/graphical_debugging.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/graphical_debugging.png
--------------------------------------------------------------------------------
/images/graphical_watch_sph.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/images/graphical_watch_sph.png
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/solution/GraphicalDebugging/icon.ico
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/solution/GraphicalDebugging/preview.png
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/Resources/plot.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/solution/GraphicalDebugging/Resources/plot.ico
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/Resources/geometry.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/solution/GraphicalDebugging/Resources/geometry.ico
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/Resources/graphical.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/solution/GraphicalDebugging/Resources/graphical.ico
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/Resources/PlotWatchCommand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/solution/GraphicalDebugging/Resources/PlotWatchCommand.png
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/Resources/GeometriesWatchCommand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/solution/GraphicalDebugging/Resources/GeometriesWatchCommand.png
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/Resources/GraphicalWatchCommand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/awulkiew/graphical-debugging/HEAD/solution/GraphicalDebugging/Resources/GraphicalWatchCommand.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | solution/.vs
2 | solution/GraphicalDebugging/GraphicalDebugging.csproj.user
3 | solution/GraphicalDebugging/bin
4 | solution/GraphicalDebugging/obj
5 | solution/packages
6 | solution/*.sdf
7 | solution/*.db
8 | solution/*.opendb
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/BoostArray.natvis:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{ size={$T2} }}
7 |
8 |
9 | $T2
10 | ($T1 *)elems
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/BoostCircularBuffer.natvis:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{ size={m_size} }}
7 |
8 | - (m_end - m_buff)
9 | - *(($T2 *)this)
10 |
11 | m_size
12 | *(m_first + ($i < (m_end - m_first) ? $i : $i - (m_end - m_buff)))
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/examples/sfml.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | x
7 | y
8 |
9 |
10 |
11 |
12 |
13 | position.x
14 | position.y
15 |
16 |
17 |
18 |
19 |
20 |
21 | m_vertices.m_vertices
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | m_vertices.m_vertices
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/LoadingWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using System.Windows;
8 |
9 | namespace GraphicalDebugging
10 | {
11 | public partial class LoadingWindow : Window
12 | {
13 | public LoadingWindow()
14 | {
15 | IsClosed = false;
16 | InitializeComponent();
17 | }
18 |
19 | public bool IsClosed { get; private set; }
20 |
21 | private void LoadingStopButton_Click(object sender, RoutedEventArgs e)
22 | {
23 | IsClosed = true;
24 | this.Close();
25 | }
26 |
27 | private void Window_Closed(object sender, System.EventArgs e)
28 | {
29 | IsClosed = true;
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015 Adam Wulkiewicz
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015-2023 Adam Wulkiewicz
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/solution/GraphicalDebugging.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.28307.705
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GraphicalDebugging", "GraphicalDebugging\GraphicalDebugging.csproj", "{D0630F15-DC04-42D3-9243-50C4377AD857}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {D0630F15-DC04-42D3-9243-50C4377AD857}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {D0630F15-DC04-42D3-9243-50C4377AD857}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {D0630F15-DC04-42D3-9243-50C4377AD857}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {D0630F15-DC04-42D3-9243-50C4377AD857}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {C32F2AF1-99B5-4447-AE74-283F42C3D90A}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Graphical Debugging")]
9 | [assembly: AssemblyDescription("Visual Studio 2022 Graphical Debugging Tools")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Graphical Debugging")]
13 | [assembly: AssemblyCopyright("Adam Wulkiewicz")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // Version information for an assembly consists of the following four values:
23 | //
24 | // Major Version
25 | // Minor Version
26 | // Build Number
27 | // Revision
28 | //
29 | // You can specify all the values or you can default the Build and Revision Numbers
30 | // by using the '*' as shown below:
31 | // [assembly: AssemblyVersion("1.0.*")]
32 | [assembly: AssemblyVersion("0.56.0.0")]
33 | [assembly: AssemblyFileVersion("0.56.0.0")]
34 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/LoadingWindow.xaml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
25 |
26 |
27 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GeometryWatchOptionPage.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using Microsoft.VisualStudio.Shell;
8 | using System.ComponentModel;
9 |
10 | namespace GraphicalDebugging
11 | {
12 | public class GeometryWatchOptionPage : DialogPage
13 | {
14 | private bool densify = true;
15 | private bool enableDirs = true;
16 | private bool enableLabels = true;
17 |
18 | [Category("Display")]
19 | [DisplayName("Densify Non-Cartesian Geometries")]
20 | [Description("Enable/disable densification to reflect curvature of the globe.")]
21 | public bool Densify
22 | {
23 | get { return densify; }
24 | set { densify = value; }
25 | }
26 |
27 | [Category("Display")]
28 | [DisplayName("Enable Directions")]
29 | [Description("Enable/disable drawing directions of segments.")]
30 | public bool EnableDirections
31 | {
32 | get { return enableDirs; }
33 | set { enableDirs = value; }
34 | }
35 |
36 | [Category("Display")]
37 | [DisplayName("Enable Labels")]
38 | [Description("Enable/disable drawing labels if applicable (e.g. for Boost.Geometry intersection points).")]
39 | public bool EnableLabels
40 | {
41 | get { return enableLabels; }
42 | set { enableLabels = value; }
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/BoostContainer.natvis:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{ size={m_holder.m_size} }}
7 |
8 | - m_holder.m_capacity
9 | - m_holder
10 |
11 | m_holder.m_size
12 | m_holder.m_start
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{ size={m_holder.m_size} }}
20 |
21 | - $T2
22 | - m_holder
23 |
24 | m_holder.m_size
25 | ($T1 *)m_holder.storage.dummy
26 |
27 |
28 |
29 |
30 | {{ size={m_holder.m_size} }}
31 |
32 | - $T2
33 | - m_holder
34 |
35 | m_holder.m_size
36 | ($T1 *)m_holder.storage.data
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/PlotWatch.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | namespace GraphicalDebugging
8 | {
9 | using System;
10 | using System.Runtime.InteropServices;
11 | using Microsoft.VisualStudio.Shell;
12 |
13 | ///
14 | /// This class implements the tool window exposed by this package and hosts a user control.
15 | ///
16 | ///
17 | /// In Visual Studio tool windows are composed of a frame (implemented by the shell) and a pane,
18 | /// usually implemented by the package implementer.
19 | ///
20 | /// This class derives from the ToolWindowPane class provided from the MPF in order to use its
21 | /// implementation of the IVsUIElementPane interface.
22 | ///
23 | ///
24 | [Guid("be25f4c9-0927-40df-aab5-48407602d58d")]
25 | public class PlotWatch : ToolWindowPane
26 | {
27 | ///
28 | /// Initializes a new instance of the class.
29 | ///
30 | public PlotWatch() : base(null)
31 | {
32 | this.Caption = "Plot Watch";
33 |
34 | // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
35 | // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
36 | // the object returned by the Content property.
37 | this.Content = new PlotWatchControl();
38 | }
39 |
40 | protected override void OnClose()
41 | {
42 | (this.Content as PlotWatchControl).OnClose();
43 | base.OnClose();
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GeometryWatch.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | namespace GraphicalDebugging
8 | {
9 | using System;
10 | using System.Runtime.InteropServices;
11 | using Microsoft.VisualStudio.Shell;
12 |
13 | ///
14 | /// This class implements the tool window exposed by this package and hosts a user control.
15 | ///
16 | ///
17 | /// In Visual Studio tool windows are composed of a frame (implemented by the shell) and a pane,
18 | /// usually implemented by the package implementer.
19 | ///
20 | /// This class derives from the ToolWindowPane class provided from the MPF in order to use its
21 | /// implementation of the IVsUIElementPane interface.
22 | ///
23 | ///
24 | [Guid("a9b7cbec-2f38-4ece-b2d1-fddf233cee59")]
25 | public class GeometryWatch : ToolWindowPane
26 | {
27 | ///
28 | /// Initializes a new instance of the class.
29 | ///
30 | public GeometryWatch() : base(null)
31 | {
32 | this.Caption = "Geometry Watch";
33 |
34 | // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
35 | // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
36 | // the object returned by the Content property.
37 | this.Content = new GeometryWatchControl();
38 | }
39 |
40 | protected override void OnClose()
41 | {
42 | (this.Content as GeometryWatchControl).OnClose();
43 | base.OnClose();
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GraphicalWatch.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | namespace GraphicalDebugging
8 | {
9 | using System;
10 | using System.Runtime.InteropServices;
11 | using Microsoft.VisualStudio.Shell;
12 |
13 | ///
14 | /// This class implements the tool window exposed by this package and hosts a user control.
15 | ///
16 | ///
17 | /// In Visual Studio tool windows are composed of a frame (implemented by the shell) and a pane,
18 | /// usually implemented by the package implementer.
19 | ///
20 | /// This class derives from the ToolWindowPane class provided from the MPF in order to use its
21 | /// implementation of the IVsUIElementPane interface.
22 | ///
23 | ///
24 | [Guid("a13487f6-747e-4c4f-9c2e-92ed4457552c")]
25 | public class GraphicalWatch : ToolWindowPane
26 | {
27 | ///
28 | /// Initializes a new instance of the class.
29 | ///
30 | public GraphicalWatch() : base(null)
31 | {
32 | this.Caption = "Graphical Watch";
33 |
34 | // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable,
35 | // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on
36 | // the object returned by the Content property.
37 | this.Content = new GraphicalWatchControl();
38 | }
39 |
40 | protected override void OnClose()
41 | {
42 | (this.Content as GraphicalWatchControl).OnClose();
43 | base.OnClose();
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/BoostPolygon.natvis:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{{coords_[0]}, {coords_[1]}}}
7 |
8 |
9 | 2
10 | coords_
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{{coords_[0]}, {coords_[1]}}}
18 |
19 |
20 | 2
21 | coords_
22 |
23 |
24 |
25 |
26 |
27 |
28 | {{{points_[0]}, {points_[1]}}}
29 |
30 |
31 | 2
32 | points_
33 |
34 |
35 |
36 |
37 |
38 |
39 | {{{ranges_[0]}, {ranges_[1]}}}
40 |
41 |
42 | 2
43 | ranges_
44 |
45 |
46 |
47 |
48 |
49 |
50 | {coords_}
51 |
52 | coords_
53 |
54 |
55 |
56 |
57 |
58 | {{outer={self_}, inners={holes_}}}
59 |
60 | - self_
61 | - holes_
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/BoostMPL.natvis:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 |
9 |
10 |
11 |
12 | {$T1}
13 |
14 |
15 | {$T1}
16 |
17 |
18 | {($T1)$T2}
19 |
20 |
21 |
22 |
23 |
24 | {{ size=1 }}
25 |
26 | - *(($T1*)this)
27 |
28 |
29 |
30 | {{ size=2 }}
31 |
32 | - *(($T1*)this)
33 | - *(($T2*)this)
34 |
35 |
36 |
37 | {{ size=3 }}
38 |
39 | - *(($T1*)this)
40 | - *(($T2*)this)
41 | - *(($T3*)this)
42 |
43 |
44 |
45 | {{ size=4 }}
46 |
47 | - *(($T1*)this)
48 | - *(($T2*)this)
49 | - *(($T3*)this)
50 | - *(($T4*)this)
51 |
52 |
53 |
54 | {{ size=5 }}
55 |
56 | - *(($T1*)this)
57 | - *(($T2*)this)
58 | - *(($T3*)this)
59 | - *(($T4*)this)
60 | - *(($T5*)this)
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/PlotWatchOptionPage.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using Microsoft.VisualStudio.Shell;
8 | using System.ComponentModel;
9 |
10 | namespace GraphicalDebugging
11 | {
12 | public class PlotWatchOptionPage : DialogPage
13 | {
14 | private bool PointPlot_enableLines = false;
15 | private bool PointPlot_enablePoints = true;
16 |
17 | private bool ValuePlot_enableBars = true;
18 | private bool ValuePlot_enableLines = false;
19 | private bool ValuePlot_enablePoints = false;
20 |
21 | [Category("Point Plot")]
22 | [DisplayName("Enable Lines")]
23 | [Description("Enable/disable drawing lines between points.")]
24 | public bool PointPlot_EnableLines
25 | {
26 | get { return PointPlot_enableLines; }
27 | set { PointPlot_enableLines = value; }
28 | }
29 |
30 | [Category("Point Plot")]
31 | [DisplayName("Enable Points")]
32 | [Description("Enable/disable drawing points.")]
33 | public bool PointPlot_EnablePoints
34 | {
35 | get { return PointPlot_enablePoints; }
36 | set { PointPlot_enablePoints = value; }
37 | }
38 |
39 | [Category("Value Plot")]
40 | [DisplayName("Enable Bars")]
41 | [Description("Enable/disable drawing bars representing values.")]
42 | public bool ValuePlot_EnableBars
43 | {
44 | get { return ValuePlot_enableBars; }
45 | set { ValuePlot_enableBars = value; }
46 | }
47 |
48 | [Category("Value Plot")]
49 | [DisplayName("Enable Lines")]
50 | [Description("Enable/disable drawing lines between values.")]
51 | public bool ValuePlot_EnableLines
52 | {
53 | get { return ValuePlot_enableLines; }
54 | set { ValuePlot_enableLines = value; }
55 | }
56 |
57 | [Category("Value Plot")]
58 | [DisplayName("Enable Points")]
59 | [Description("Enable/disable drawing points representing values.")]
60 | public bool ValuePlot_EnablePoints
61 | {
62 | get { return ValuePlot_enablePoints; }
63 | set { ValuePlot_enablePoints = value; }
64 | }
65 |
66 | protected override void OnApply(PageApplyEventArgs e)
67 | {
68 | if (!PointPlot_enableLines && !PointPlot_enablePoints)
69 | PointPlot_enablePoints = true;
70 |
71 | if (!ValuePlot_enableBars && !ValuePlot_enableLines && !ValuePlot_enablePoints)
72 | ValuePlot_enableBars = true;
73 |
74 | base.OnApply(e);
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/source.extension.vsixmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Graphical Debugging
6 | Visualization of C++ and C# variables during debugging, e.g. Boost.Geometry models, containers of values, arrays of points, etc.
7 | LICENSE.txt
8 | release_notes.txt
9 | icon.ico
10 | preview.png
11 | 2d array boost box c c# c++ cartesian chart container complex curve debugger debugging deque geographic geometry gis graphical linestring list mpl plot point polygon ring segment spherical std stl tuple variant vector
12 |
13 |
14 |
17 |
18 | amd64
19 |
20 |
21 | amd64
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GeneralOptionControl.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Threading.Tasks;
9 | using System.Windows.Forms;
10 |
11 | namespace GraphicalDebugging
12 | {
13 | public partial class GeneralOptionControl : UserControl
14 | {
15 | public GeneralOptionControl()
16 | {
17 | InitializeComponent();
18 |
19 | toolTip.SetToolTip(checkBoxMemoryAccess, "Enable/disable loading data directly from memory of debugged process.");
20 |
21 | toolTip.SetToolTip(labelCpp, "Path to XML file defining C++ user types.");
22 | toolTip.SetToolTip(textBoxCpp, "Path to XML file defining C++ user types.");
23 | toolTip.SetToolTip(buttonCpp, "Path to XML file defining C++ user types.");
24 |
25 | toolTip.SetToolTip(labelCS, "Path to XML file defining C# user types.");
26 | toolTip.SetToolTip(textBoxCS, "Path to XML file defining C# user types.");
27 | toolTip.SetToolTip(buttonCS, "Path to XML file defining C# user types.");
28 | }
29 |
30 | private void GeneralOptionControl_SizeChanged(object sender, EventArgs e)
31 | {
32 | int interiorWidth = groupBoxUserTypes.Width - groupBoxUserTypes.Padding.Right - groupBoxUserTypes.Padding.Left;
33 |
34 | labelCpp.Width = interiorWidth;
35 |
36 | textBoxCpp.Width = interiorWidth - buttonCpp.Width - 10;
37 | textBoxCS.Width = interiorWidth - buttonCS.Width - 10;
38 |
39 | buttonCpp.Left = groupBoxUserTypes.Width - groupBoxUserTypes.Padding.Right - buttonCpp.Width;
40 | buttonCS.Left = groupBoxUserTypes.Width - groupBoxUserTypes.Padding.Right - buttonCS.Width;
41 | }
42 |
43 | public bool EnableDirectMemoryAccess
44 | {
45 | get { return checkBoxMemoryAccess.Checked; }
46 | set { checkBoxMemoryAccess.Checked = value; }
47 | }
48 |
49 | public string UserTypesPathCpp
50 | {
51 | get { return textBoxCpp.Text; }
52 | set { textBoxCpp.Text = value; }
53 | }
54 |
55 | public string UserTypesPathCS
56 | {
57 | get { return textBoxCS.Text; }
58 | set { textBoxCS.Text = value; }
59 | }
60 |
61 | private void buttonCpp_Click(object sender, EventArgs e)
62 | {
63 | OpenFileDialog(textBoxCpp);
64 | }
65 |
66 | private void buttonCS_Click(object sender, EventArgs e)
67 | {
68 | OpenFileDialog(textBoxCS);
69 | }
70 |
71 | private void OpenFileDialog(TextBox textBox)
72 | {
73 | using (OpenFileDialog openFileDialog = new OpenFileDialog())
74 | {
75 | openFileDialog.InitialDirectory = textBox.Text;
76 | openFileDialog.Filter = "XML files (*.xml)|*.xml|All files (*.*)|*.*";
77 | openFileDialog.FilterIndex = 1;
78 | openFileDialog.RestoreDirectory = true;
79 |
80 | if (openFileDialog.ShowDialog() == DialogResult.OK)
81 | {
82 | textBox.Text = openFileDialog.FileName;
83 | }
84 | }
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GeneralOptionPage.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using Microsoft.VisualStudio.Shell;
8 | using System.ComponentModel;
9 |
10 | namespace GraphicalDebugging
11 | {
12 | public class GeneralOptionPage : DialogPage
13 | {
14 | private bool enableDirectMemoryAccess = true;
15 | private string userTypesPathCpp = "";
16 | private string userTypesPathCS = "";
17 |
18 | public bool isUserTypesPathCppChanged = false;
19 | public bool isUserTypesPathCSChanged = false;
20 | public System.DateTime userTypesCppWriteTime = new System.DateTime(0);
21 | public System.DateTime userTypesCSWriteTime = new System.DateTime(0);
22 |
23 | [Category("Data Access")]
24 | [DisplayName("Enable Direct Memory Access")]
25 | [Description("Enable/disable loading data directly from memory of debugged process.")]
26 | public bool EnableDirectMemoryAccess
27 | {
28 | get { return enableDirectMemoryAccess; }
29 | set { enableDirectMemoryAccess = value; }
30 | }
31 |
32 | [Category("User Types")]
33 | [DisplayName("C++")]
34 | [Description("Path to XML file defining C++ user types.")]
35 | public string UserTypesPathCpp
36 | {
37 | get { return userTypesPathCpp; }
38 | set { userTypesPathCpp = value; isUserTypesPathCppChanged = true; }
39 | }
40 |
41 | [Category("User Types")]
42 | [DisplayName("C#")]
43 | [Description("Path to XML file defining C# user types.")]
44 | public string UserTypesPathCS
45 | {
46 | get { return userTypesPathCS; }
47 | set { userTypesPathCS = value; isUserTypesPathCSChanged = true; }
48 | }
49 |
50 | public GeneralOptionPage()
51 | {
52 | control = new GeneralOptionControl();
53 | control.EnableDirectMemoryAccess = EnableDirectMemoryAccess;
54 | control.UserTypesPathCpp = UserTypesPathCpp;
55 | control.UserTypesPathCS = UserTypesPathCS;
56 | }
57 |
58 | protected override System.Windows.Forms.IWin32Window Window
59 | {
60 | get { return control; }
61 | }
62 |
63 | public override void LoadSettingsFromStorage()
64 | {
65 | base.LoadSettingsFromStorage();
66 | control.EnableDirectMemoryAccess = EnableDirectMemoryAccess;
67 | control.UserTypesPathCpp = UserTypesPathCpp;
68 | control.UserTypesPathCS = UserTypesPathCS;
69 | }
70 |
71 | protected override void OnApply(PageApplyEventArgs e)
72 | {
73 | if (e.ApplyBehavior == ApplyKind.Apply)
74 | {
75 | EnableDirectMemoryAccess = control.EnableDirectMemoryAccess;
76 | if (UserTypesPathCpp != control.UserTypesPathCpp)
77 | UserTypesPathCpp = control.UserTypesPathCpp;
78 | if (UserTypesPathCS != control.UserTypesPathCS)
79 | UserTypesPathCS = control.UserTypesPathCS;
80 | }
81 |
82 | base.OnApply(e);
83 | }
84 |
85 | GeneralOptionControl control;
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/examples/cs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | _x
7 | _y
8 |
9 |
10 |
11 |
12 |
13 | x
14 | y
15 |
16 |
17 |
18 |
19 |
20 | x
21 | y
22 |
23 |
24 |
25 |
34 |
35 |
36 | x
37 | y
38 |
39 |
40 |
41 |
50 |
51 |
52 | mi
53 | ma
54 |
55 |
56 |
57 |
66 |
67 |
68 | left
69 | bottom
70 | right
71 | top
72 |
73 |
74 |
75 |
84 |
85 |
86 | left
87 | bottom
88 | width
89 | height
90 |
91 |
92 |
93 |
102 |
103 |
104 |
105 | points
106 |
107 |
108 |
109 |
110 |
117 |
118 |
119 |
120 | (System.Collections.Generic.List<WpfApp1.MyPoint>)this
121 |
122 |
123 |
124 |
125 |
134 |
135 |
136 |
137 | points
138 |
139 |
140 |
141 |
142 |
149 |
150 |
151 | outer
152 |
153 |
154 |
155 | inners
156 |
157 |
158 |
159 |
160 |
161 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/PlotWatchCommand.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using Microsoft.VisualStudio.Shell;
8 | using Microsoft.VisualStudio.Shell.Interop;
9 | using System;
10 | using System.ComponentModel.Design;
11 | using System.Threading;
12 | using Task = System.Threading.Tasks.Task;
13 |
14 | namespace GraphicalDebugging
15 | {
16 | ///
17 | /// Command handler
18 | ///
19 | internal sealed class PlotWatchCommand
20 | {
21 | ///
22 | /// Command ID.
23 | ///
24 | public const int CommandId = 258;
25 |
26 | ///
27 | /// Command menu group (command set GUID).
28 | ///
29 | public static readonly Guid CommandSet = new Guid("9550913a-2953-4f4a-9eb0-96a0bf7d3d87");
30 |
31 | ///
32 | /// VS Package that provides this command, not null.
33 | ///
34 | private readonly AsyncPackage package;
35 |
36 | ///
37 | /// Initializes a new instance of the class.
38 | /// Adds our command handlers for menu (commands must exist in the command table file)
39 | ///
40 | /// Owner package, not null.
41 | private PlotWatchCommand(AsyncPackage package, OleMenuCommandService commandService)
42 | {
43 | ThreadHelper.ThrowIfNotOnUIThread();
44 |
45 | this.package = package ?? throw new ArgumentNullException(nameof(package));
46 | commandService = commandService ?? throw new ArgumentNullException(nameof(commandService));
47 |
48 | var menuCommandID = new CommandID(CommandSet, CommandId);
49 | var menuItem = new MenuCommand(this.ShowToolWindow, menuCommandID);
50 | commandService.AddCommand(menuItem);
51 | }
52 |
53 | ///
54 | /// Gets the instance of the command.
55 | ///
56 | public static PlotWatchCommand Instance
57 | {
58 | get;
59 | private set;
60 | }
61 |
62 | ///
63 | /// Gets the service provider from the owner package.
64 | ///
65 | private IAsyncServiceProvider ServiceProvider
66 | {
67 | get
68 | {
69 | return this.package;
70 | }
71 | }
72 |
73 | ///
74 | /// Initializes the singleton instance of the command.
75 | ///
76 | /// Owner package, not null.
77 | public static async Task InitializeAsync(GraphicalDebuggingPackage package)
78 | {
79 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(package.DisposalToken);
80 |
81 | OleMenuCommandService commandService = await package.GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;
82 |
83 | Instance = new PlotWatchCommand(package, commandService);
84 | }
85 |
86 | ///
87 | /// Shows the tool window when the menu item is clicked.
88 | ///
89 | /// The event sender.
90 | /// The event args.
91 | private void ShowToolWindow(object sender, EventArgs e)
92 | {
93 | Util.ShowWindow(this.package, "Plot Watch");
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GeometryWatchCommand.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using Microsoft.VisualStudio.Shell;
8 | using Microsoft.VisualStudio.Shell.Interop;
9 | using System;
10 | using System.ComponentModel.Design;
11 | using System.Threading;
12 | using Task = System.Threading.Tasks.Task;
13 |
14 | namespace GraphicalDebugging
15 | {
16 | ///
17 | /// Command handler
18 | ///
19 | internal sealed class GeometryWatchCommand
20 | {
21 | ///
22 | /// Command ID.
23 | ///
24 | public const int CommandId = 256;
25 |
26 | ///
27 | /// Command menu group (command set GUID).
28 | ///
29 | public static readonly Guid CommandSet = new Guid("9550913a-2953-4f4a-9eb0-96a0bf7d3d87");
30 |
31 | ///
32 | /// VS Package that provides this command, not null.
33 | ///
34 | private readonly AsyncPackage package;
35 |
36 | ///
37 | /// Initializes a new instance of the class.
38 | /// Adds our command handlers for menu (commands must exist in the command table file)
39 | ///
40 | /// Owner package, not null.
41 | private GeometryWatchCommand(AsyncPackage package, OleMenuCommandService commandService)
42 | {
43 | ThreadHelper.ThrowIfNotOnUIThread();
44 |
45 | this.package = package ?? throw new ArgumentNullException(nameof(package));
46 | commandService = commandService ?? throw new ArgumentNullException(nameof(commandService));
47 |
48 | var menuCommandID = new CommandID(CommandSet, CommandId);
49 | var menuItem = new MenuCommand(this.ShowToolWindow, menuCommandID);
50 | commandService.AddCommand(menuItem);
51 | }
52 |
53 | ///
54 | /// Gets the instance of the command.
55 | ///
56 | public static GeometryWatchCommand Instance
57 | {
58 | get;
59 | private set;
60 | }
61 |
62 | ///
63 | /// Gets the service provider from the owner package.
64 | ///
65 | private IAsyncServiceProvider ServiceProvider
66 | {
67 | get
68 | {
69 | return this.package;
70 | }
71 | }
72 |
73 | ///
74 | /// Initializes the singleton instance of the command.
75 | ///
76 | /// Owner package, not null.
77 | public static async Task InitializeAsync(GraphicalDebuggingPackage package)
78 | {
79 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(package.DisposalToken);
80 |
81 | OleMenuCommandService commandService = await package.GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;
82 |
83 | Instance = new GeometryWatchCommand(package, commandService);
84 | }
85 |
86 | ///
87 | /// Shows the tool window when the menu item is clicked.
88 | ///
89 | /// The event sender.
90 | /// The event args.
91 | private void ShowToolWindow(object sender, EventArgs e)
92 | {
93 | Util.ShowWindow(this.package, "Geometry Watch");
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GraphicalWatchCommand.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using Microsoft.VisualStudio.Shell;
8 | using Microsoft.VisualStudio.Shell.Interop;
9 | using System;
10 | using System.ComponentModel.Design;
11 | using System.Threading;
12 | using Task = System.Threading.Tasks.Task;
13 |
14 | namespace GraphicalDebugging
15 | {
16 | ///
17 | /// Command handler
18 | ///
19 | internal sealed class GraphicalWatchCommand
20 | {
21 | ///
22 | /// Command ID.
23 | ///
24 | public const int CommandId = 257;
25 |
26 | ///
27 | /// Command menu group (command set GUID).
28 | ///
29 | public static readonly Guid CommandSet = new Guid("9550913a-2953-4f4a-9eb0-96a0bf7d3d87");
30 |
31 | ///
32 | /// VS Package that provides this command, not null.
33 | ///
34 | private readonly AsyncPackage package;
35 |
36 | ///
37 | /// Initializes a new instance of the class.
38 | /// Adds our command handlers for menu (commands must exist in the command table file)
39 | ///
40 | /// Owner package, not null.
41 | private GraphicalWatchCommand(AsyncPackage package, OleMenuCommandService commandService)
42 | {
43 | ThreadHelper.ThrowIfNotOnUIThread();
44 |
45 | this.package = package ?? throw new ArgumentNullException(nameof(package));
46 | commandService = commandService ?? throw new ArgumentNullException(nameof(commandService));
47 |
48 | var menuCommandID = new CommandID(CommandSet, CommandId);
49 | var menuItem = new MenuCommand(this.ShowToolWindow, menuCommandID);
50 | commandService.AddCommand(menuItem);
51 | }
52 |
53 | ///
54 | /// Gets the instance of the command.
55 | ///
56 | public static GraphicalWatchCommand Instance
57 | {
58 | get;
59 | private set;
60 | }
61 |
62 | ///
63 | /// Gets the service provider from the owner package.
64 | ///
65 | private IAsyncServiceProvider ServiceProvider
66 | {
67 | get
68 | {
69 | return this.package;
70 | }
71 | }
72 |
73 | ///
74 | /// Initializes the singleton instance of the command.
75 | ///
76 | /// Owner package, not null.
77 | public static async Task InitializeAsync(GraphicalDebuggingPackage package)
78 | {
79 | await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(package.DisposalToken);
80 |
81 | OleMenuCommandService commandService = await package.GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;
82 |
83 | Instance = new GraphicalWatchCommand(package, commandService);
84 | }
85 |
86 | ///
87 | /// Shows the tool window when the menu item is clicked.
88 | ///
89 | /// The event sender.
90 | /// The event args.
91 | private void ShowToolWindow(object sender, EventArgs e)
92 | {
93 | Util.ShowWindow(this.package, "Graphical Watch");
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/VariableItem.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | namespace GraphicalDebugging
8 | {
9 | class VariableItem
10 | : System.ComponentModel.INotifyPropertyChanged
11 | {
12 | public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
13 | protected void NotifyPropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = "")
14 | {
15 | if (PropertyChanged != null)
16 | PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
17 | }
18 |
19 | protected string name;
20 | public string Name
21 | {
22 | get { return this.name; }
23 | set
24 | {
25 | if (value != this.name)
26 | {
27 | this.name = value;
28 | NotifyPropertyChanged("Name");
29 | }
30 | }
31 | }
32 |
33 | protected string type;
34 | public string Type
35 | {
36 | get { return this.type; }
37 | set { this.type = value; }
38 | }
39 |
40 | protected string error;
41 | public string Error
42 | {
43 | get { return this.error; }
44 | set { this.error = value; }
45 | }
46 |
47 | protected bool isEnabled = true;
48 | public bool IsEnabled
49 | {
50 | get { return this.isEnabled; }
51 | set
52 | {
53 | if (value != this.isEnabled)
54 | {
55 | this.isEnabled = value;
56 | NotifyPropertyChanged("IsEnabled");
57 | }
58 | }
59 | }
60 |
61 | public string TypeOrError
62 | {
63 | get { return string.IsNullOrEmpty(Type) ? Error : Type; }
64 | }
65 |
66 | public string ErrorOrType
67 | {
68 | get { return string.IsNullOrEmpty(Error) ? Type : Error; }
69 | }
70 |
71 | public bool IsError
72 | {
73 | get { return !string.IsNullOrEmpty(Error); }
74 | }
75 |
76 | public bool IsTypeAndError
77 | {
78 | get { return !string.IsNullOrEmpty(Type) && !string.IsNullOrEmpty(Error); }
79 | }
80 | }
81 |
82 | class DrawableItem : VariableItem
83 | {
84 | protected ExpressionDrawer.IDrawable drawable;
85 | public ExpressionDrawer.IDrawable Drawable
86 | {
87 | get { return this.drawable; }
88 | set { this.drawable = value; }
89 | }
90 |
91 | protected Geometry.Traits traits;
92 | public Geometry.Traits Traits
93 | {
94 | get { return this.traits; }
95 | set { this.traits = value; }
96 | }
97 | }
98 |
99 | class GraphicalItem : DrawableItem
100 | {
101 | protected System.Drawing.Bitmap bmp;
102 | public System.Drawing.Bitmap Bmp
103 | {
104 | get { return this.bmp; }
105 | set
106 | {
107 | this.bmp = value;
108 | this.bmpImg = null;
109 | }
110 | }
111 |
112 | protected System.Windows.Media.Imaging.BitmapImage bmpImg;
113 | public System.Windows.Media.Imaging.BitmapImage BmpImg
114 | {
115 | get
116 | {
117 | if (this.bmpImg == null && this.bmp != null)
118 | this.bmpImg = Util.BitmapToBitmapImage(this.bmp);
119 | return this.bmpImg;
120 | }
121 | }
122 |
123 | public GraphicalItem ShallowCopy()
124 | {
125 | return this.MemberwiseClone() as GraphicalItem;
126 | }
127 | }
128 |
129 | class ColoredDrawableItem : DrawableItem
130 | {
131 | public ColoredDrawableItem()
132 | {
133 | Color = Util.ConvertColor(Colors.Transparent);
134 | ColorId = -1;
135 | }
136 |
137 | public System.Windows.Media.Color Color { get; set; }
138 | public int ColorId { get; set; }
139 | }
140 |
141 | class GeometryItem : ColoredDrawableItem
142 | {
143 | public GeometryItem ShallowCopy()
144 | {
145 | return this.MemberwiseClone() as GeometryItem;
146 | }
147 | }
148 |
149 | class PlotItem : ColoredDrawableItem
150 | {
151 | public PlotItem ShallowCopy()
152 | {
153 | return this.MemberwiseClone() as PlotItem;
154 | }
155 | }
156 | }
157 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GraphicalDebuggingPackage.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using Microsoft.VisualStudio.Shell;
8 | using System;
9 | using System.Diagnostics.CodeAnalysis;
10 | using System.Runtime.InteropServices;
11 | using System.Threading;
12 | using Task = System.Threading.Tasks.Task;
13 |
14 | namespace GraphicalDebugging
15 | {
16 | ///
17 | /// This is the class that implements the package exposed by this assembly.
18 | ///
19 | ///
20 | ///
21 | /// The minimum requirement for a class to be considered a valid package for Visual Studio
22 | /// is to implement the IVsPackage interface and register itself with the shell.
23 | /// This package uses the helper classes defined inside the Managed Package Framework (MPF)
24 | /// to do it: it derives from the Package class that provides the implementation of the
25 | /// IVsPackage interface and uses the registration attributes defined in the framework to
26 | /// register itself and its components with the shell. These attributes tell the pkgdef creation
27 | /// utility what data to put into .pkgdef file.
28 | ///
29 | ///
30 | /// To get loaded into VS, the package must be referred by <Asset Type="Microsoft.VisualStudio.VsPackage" ...> in .vsixmanifest file.
31 | ///
32 | ///
33 | [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
34 | [InstalledProductRegistration("#110", "#112", "1.0", IconResourceID = 400)] // Info on this package for Help/About
35 | [ProvideMenuResource("Menus.ctmenu", 1)]
36 | [Guid(GraphicalDebuggingPackage.PackageGuidString)]
37 | [ProvideToolWindow(typeof(GeometryWatch), MultiInstances = true)]
38 | [ProvideToolWindow(typeof(GraphicalWatch), MultiInstances = true)]
39 | [ProvideToolWindow(typeof(PlotWatch), MultiInstances = true)]
40 | [ProvideOptionPage(typeof(GeneralOptionPage), "Graphical Debugging", "General", 0, 0, true)]
41 | [ProvideOptionPage(typeof(GeometryWatchOptionPage), "Graphical Debugging", "Geometry Watch", 0, 0, true)]
42 | [ProvideOptionPage(typeof(GraphicalWatchOptionPage), "Graphical Debugging", "Graphical Watch", 0, 0, true)]
43 | [ProvideOptionPage(typeof(PlotWatchOptionPage), "Graphical Debugging", "Plot Watch", 0, 0, true)]
44 | public sealed class GraphicalDebuggingPackage : AsyncPackage
45 | {
46 | ///
47 | /// GraphicalDebuggingPackage GUID string.
48 | ///
49 | public const string PackageGuidString = "f63e15c7-29b1-420d-94a9-8b28e516c170";
50 |
51 | ///
52 | /// GraphicalDebuggingPackage Instance set during initialization of the package.
53 | ///
54 | public static GraphicalDebuggingPackage Instance { get; private set; }
55 |
56 | ///
57 | /// Initializes a new instance of the class.
58 | ///
59 | public GraphicalDebuggingPackage()
60 | {
61 | // Inside this method you can place any initialization code that does not require
62 | // any Visual Studio service because at this point the package object is created but
63 | // not sited yet inside Visual Studio environment. The place to do all the other
64 | // initialization is the Initialize method.
65 | }
66 |
67 | #region Package Members
68 |
69 | ///
70 | /// Initialization of the package; this method is called right after the package is sited, so this is the place
71 | /// where you can put all the initialization code that rely on services provided by VisualStudio.
72 | ///
73 | protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress progress)
74 | {
75 | // When initialized asynchronously, the current thread may be a background thread at this point.
76 | // Do any initialization that requires the UI thread after switching to the UI thread.
77 | await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
78 |
79 | Instance = this;
80 |
81 | await ExpressionLoader.InitializeAsync(this);
82 |
83 | await GeometryWatchCommand.InitializeAsync(this);
84 | await GraphicalWatchCommand.InitializeAsync(this);
85 | await PlotWatchCommand.InitializeAsync(this);
86 | }
87 |
88 | public new DialogPage GetDialogPage(Type dialogPageType)
89 | {
90 | return base.GetDialogPage(dialogPageType);
91 | }
92 |
93 | #endregion
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GraphicalWatchOptionPage.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using Microsoft.VisualStudio.Shell;
8 | using System;
9 | using System.ComponentModel;
10 |
11 | namespace GraphicalDebugging
12 | {
13 | public class GraphicalWatchOptionPage : DialogPage
14 | {
15 | private bool densify = true;
16 | private bool enableDirs = false;
17 | private bool enableLabels = false;
18 | private int imageHeight = 100;
19 | private int imageWidth = 100;
20 | private MultiPointDisplayModeValue multiPointDisplayMode = MultiPointDisplayModeValue.Geometry;
21 |
22 | private bool PointPlot_enableLines = false;
23 | private bool PointPlot_enablePoints = true;
24 |
25 | private bool ValuePlot_enableBars = true;
26 | private bool ValuePlot_enableLines = false;
27 | private bool ValuePlot_enablePoints = false;
28 |
29 | private bool Image_maintainAspectRatio = false;
30 |
31 | public enum MultiPointDisplayModeValue
32 | {
33 | [Description("Geometry")]
34 | Geometry,
35 | [Description("Point Plot")]
36 | PointPlot
37 | };
38 |
39 | [Category("Display")]
40 | [DisplayName("Densify Non-Cartesian Geometries")]
41 | [Description("Enable/disable densification to reflect curvature of the globe.")]
42 | public bool Densify
43 | {
44 | get { return densify; }
45 | set { densify = value; }
46 | }
47 |
48 | [Category("Display")]
49 | [DisplayName("Enable Directions")]
50 | [Description("Enable/disable drawing directions of segments.")]
51 | public bool EnableDirections
52 | {
53 | get { return enableDirs; }
54 | set { enableDirs = value; }
55 | }
56 |
57 | [Category("Display")]
58 | [DisplayName("Enable Labels")]
59 | [Description("Enable/disable drawing labels if applicable (e.g. for Boost.Geometry intersection points).")]
60 | public bool EnableLabels
61 | {
62 | get { return enableLabels; }
63 | set { enableLabels = value; }
64 | }
65 |
66 | [Category("Display")]
67 | [DisplayName("Image Height")]
68 | [Description("Height of image displayed on the list.")]
69 | public int ImageHeight
70 | {
71 | get { return imageHeight; }
72 | set { imageHeight = Math.Max(value, 20); }
73 | }
74 |
75 | [Category("Display")]
76 | [DisplayName("Image Width")]
77 | [Description("Width of image displayed on the list.")]
78 | public int ImageWidth
79 | {
80 | get { return imageWidth; }
81 | set { imageWidth = Math.Max(value, 20); }
82 | }
83 |
84 | [Category("Display")]
85 | [DisplayName("MultiPoint Display Mode")]
86 | [Description("Treat MultiPoints as Geometries or Point Plots.")]
87 | public MultiPointDisplayModeValue MultiPointDisplayMode
88 | {
89 | get { return multiPointDisplayMode; }
90 | set { multiPointDisplayMode = value; }
91 | }
92 |
93 | [Category("Image")]
94 | [DisplayName("Maintain Aspect Ratio")]
95 | [Description("Maintain aspect ratio of an image.")]
96 | public bool Image_MaintainAspectRatio
97 | {
98 | get { return Image_maintainAspectRatio; }
99 | set { Image_maintainAspectRatio = value; }
100 | }
101 |
102 | [Category("Point Plot")]
103 | [DisplayName("Enable Lines")]
104 | [Description("Enable/disable drawing lines between points.")]
105 | public bool PointPlot_EnableLines
106 | {
107 | get { return PointPlot_enableLines; }
108 | set { PointPlot_enableLines = value; }
109 | }
110 |
111 | [Category("Point Plot")]
112 | [DisplayName("Enable Points")]
113 | [Description("Enable/disable drawing points.")]
114 | public bool PointPlot_EnablePoints
115 | {
116 | get { return PointPlot_enablePoints; }
117 | set { PointPlot_enablePoints = value; }
118 | }
119 |
120 | [Category("Value Plot")]
121 | [DisplayName("Enable Bars")]
122 | [Description("Enable/disable drawing bars representing values.")]
123 | public bool ValuePlot_EnableBars
124 | {
125 | get { return ValuePlot_enableBars; }
126 | set { ValuePlot_enableBars = value; }
127 | }
128 |
129 | [Category("Value Plot")]
130 | [DisplayName("Enable Lines")]
131 | [Description("Enable/disable drawing lines between values.")]
132 | public bool ValuePlot_EnableLines
133 | {
134 | get { return ValuePlot_enableLines; }
135 | set { ValuePlot_enableLines = value; }
136 | }
137 |
138 | [Category("Value Plot")]
139 | [DisplayName("Enable Points")]
140 | [Description("Enable/disable drawing points representing values.")]
141 | public bool ValuePlot_EnablePoints
142 | {
143 | get { return ValuePlot_enablePoints; }
144 | set { ValuePlot_enablePoints = value; }
145 | }
146 |
147 | protected override void OnApply(PageApplyEventArgs e)
148 | {
149 | if (!PointPlot_enableLines && !PointPlot_enablePoints)
150 | PointPlot_enablePoints = true;
151 |
152 | if (!ValuePlot_enableBars && !ValuePlot_enableLines && !ValuePlot_enablePoints)
153 | ValuePlot_enableBars = true;
154 |
155 | base.OnApply(e);
156 | }
157 | }
158 | }
159 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GeneralOptionControl.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | 17, 17
122 |
123 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/Colors.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using System;
8 | using System.Collections.Generic;
9 | using System.Linq;
10 | using System.Text;
11 | using System.Threading.Tasks;
12 |
13 | using System.Drawing;
14 | using System.Windows;
15 |
16 | using Microsoft.VisualStudio.PlatformUI;
17 | using Microsoft.VisualStudio.Shell;
18 | using Microsoft.VisualStudio.Utilities;
19 |
20 | namespace GraphicalDebugging
21 | {
22 | class Colors
23 | {
24 | public Colors()
25 | {
26 | // for safety, m_colors are updated in Update() again
27 | CreateColors(DarkColorValues);
28 | m_brightness = 0.5f;
29 |
30 | Update();
31 |
32 | VSColorTheme.ThemeChanged += VSColorTheme_ThemeChanged;
33 | }
34 |
35 | public delegate void ColorsChangedEventHandler();
36 | public event ColorsChangedEventHandler ColorsChanged;
37 |
38 | private void VSColorTheme_ThemeChanged(ThemeChangedEventArgs e)
39 | {
40 | Update();
41 |
42 | ColorsChanged?.Invoke();
43 | }
44 |
45 | public void Update()
46 | {
47 | float brightness = GetBrightness();
48 | if (brightness == m_brightness)
49 | return;
50 |
51 | m_brightness = brightness;
52 |
53 | if (m_brightness > 0.45f)
54 | {
55 | CreateColors(DarkColorValues);
56 |
57 | ClearColor = Color.White;
58 | TextColor = Color.Black;
59 | AabbColor = Color.Black;
60 | AxisColor = Color.LightGray;
61 | DrawColor = Color.Black;
62 |
63 | PointColor = Color.Orange;
64 | BoxColor = Color.Red;
65 | SegmentColor = Color.YellowGreen;
66 | NSphereColor = Color.Crimson;
67 | LinestringColor = Color.ForestGreen;
68 | RingColor = Color.FromArgb(0xFF, 150, 32, 150);
69 | PolygonColor = Color.RoyalBlue;
70 | MultiPointColor = Color.FromArgb(0xFF, 255, 92, 0);
71 | MultiLinestringColor = Color.DarkGreen;
72 | MultiPolygonColor = Color.FromArgb(0xFF, 0, 0, 128);
73 | TurnColor = Color.DarkOrange;
74 | }
75 | else
76 | {
77 | CreateColors(LightColorValues);
78 |
79 | ClearColor = Color.FromArgb(0xFF, 24, 24, 24);
80 | TextColor = Color.White;
81 | AabbColor = Color.White;
82 | AxisColor = Color.Gray;
83 | DrawColor = Color.White;
84 |
85 | PointColor = Color.FromArgb(0xFF, 255, 205, 128);
86 | BoxColor = Color.FromArgb(0xFF, 255, 128, 128);
87 | SegmentColor = Color.FromArgb(0xFF, 205, 0xFF, 150);
88 | NSphereColor = Color.FromArgb(0xFF, 238, 138, 158);
89 | LinestringColor = Color.FromArgb(0xFF, 128, 224, 128);
90 | MultiLinestringColor = Color.FromArgb(0xFF, 128, 192, 128);
91 | RingColor = Color.FromArgb(0xFF, 230, 172, 230);
92 | PolygonColor = Color.FromArgb(0xFF, 160, 180, 245);
93 | MultiPointColor = Color.FromArgb(0xFF, 255, 172, 128);
94 | MultiLinestringColor = Color.FromArgb(0xFF, 128, 172, 128);
95 | MultiPolygonColor = Color.FromArgb(0xFF, 128, 128, 172);
96 | TurnColor = Color.FromArgb(0xFF, 255, 197, 128);
97 | }
98 | }
99 |
100 | private float GetBrightness()
101 | {
102 | float result = 0.5f;
103 | var col = Application.Current.TryFindResource(VsColors.ToolWindowBackgroundKey);
104 | if (col != null)
105 | result = Util.ConvertColor((System.Windows.Media.Color)col).GetBrightness();
106 | return result;
107 | }
108 |
109 | private static uint[] DarkColorValues = new uint[] {
110 | 0xFFC00000, 0xFF00C000, 0xFF0000C0,
111 | 0xFFC08000, 0xFF00C080, 0xFF8000C0, 0xFFC00080, 0xFF80C000, 0xFF0080C0,
112 | 0xFFC08080, 0xFF80C080, 0xFF8080C0
113 | };
114 |
115 | private static uint[] LightColorValues = new uint[] {
116 | 0xFFF06060, 0xFF60F060, 0xFF6070F0,
117 | 0xFFF0B060, 0xFF60F0B0, 0xFFB060F0, 0xFFF060B0, 0xFFB0F060, 0xFF60B0F0,
118 | 0xFFF0B0B0, 0xFFB0F0B0, 0xFFB0B0F0
119 | };
120 |
121 | public static readonly Color Transparent = Color.FromArgb(0x00, 0xFF, 0xFF, 0xFF);
122 |
123 | public Color ClearColor { get; set; }
124 | public Color TextColor { get; set; }
125 | public Color AabbColor { get; set; }
126 | public Color AxisColor { get; set; }
127 | public Color DrawColor { get; set; }
128 |
129 | public Color PointColor { get; set; }
130 | public Color BoxColor { get; set; }
131 | public Color SegmentColor { get; set; }
132 | public Color NSphereColor { get; set; }
133 | public Color LinestringColor { get; set; }
134 | public Color RingColor { get; set; }
135 | public Color PolygonColor { get; set; }
136 | public Color MultiPointColor { get; set; }
137 | public Color MultiLinestringColor { get; set; }
138 | public Color MultiPolygonColor { get; set; }
139 | public Color TurnColor { get; set; }
140 |
141 | private void CreateColors(uint[] colorValues)
142 | {
143 | m_colors = new Color[colorValues.Length];
144 | for (int i = 0; i < colorValues.Length; ++i)
145 | m_colors[i] = Color.FromArgb((int)colorValues[i]);
146 | }
147 |
148 | public int Count { get { return m_colors.Length; } }
149 | public Color this[int i]
150 | {
151 | get
152 | {
153 | if (i < 0)
154 | return Transparent;
155 | else if (i >= m_colors.Length)
156 | return DrawColor;
157 | else
158 | return m_colors[i];
159 | }
160 | }
161 |
162 | private Color[] m_colors;
163 | private float m_brightness;
164 | }
165 | }
166 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/ExpressionLoader_Std.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace GraphicalDebugging
8 | {
9 | partial class ExpressionLoader
10 | {
11 | class StdPairPoint : PointLoader
12 | {
13 | public class LoaderCreator : ExpressionLoader.ILoaderCreator
14 | {
15 | public bool IsUserDefined() { return false; }
16 | public Kind Kind() { return ExpressionLoader.Kind.Point; }
17 | public Loader Create(Loaders loaders, Debugger debugger, string name, string type, string id)
18 | {
19 | if (id != "std::pair")
20 | return null;
21 |
22 | List tparams = Util.Tparams(type);
23 | if (tparams.Count < 2)
24 | return null;
25 |
26 | return new StdPairPoint(tparams[0], tparams[1]);
27 | }
28 | }
29 |
30 | private StdPairPoint(string firstType, string secondType)
31 | {
32 | this.firstType = firstType;
33 | this.secondType = secondType;
34 | }
35 |
36 | public override Geometry.Traits GetTraits(MemoryReader mreader, Debugger debugger,
37 | string name)
38 | {
39 | return new Geometry.Traits(2, Geometry.CoordinateSystem.Cartesian, Geometry.Unit.None);
40 | }
41 |
42 | public override ExpressionDrawer.Point LoadPointParsed(Debugger debugger, string name, string type)
43 | {
44 | return debugger.TryLoadDouble(name + ".first", out double x)
45 | && debugger.TryLoadDouble(name + ".second", out double y)
46 | ? new ExpressionDrawer.Point(x, y)
47 | : null;
48 | }
49 |
50 | public override ExpressionDrawer.Point LoadPointMemory(MemoryReader mreader, Debugger debugger,
51 | string name, string type)
52 | {
53 | MemoryReader.Converter converter = GetMemoryConverter(mreader, debugger, name, type);
54 | if (converter == null)
55 | return null;
56 |
57 | if (converter.ValueCount() != 2)
58 | throw new ArgumentOutOfRangeException("converter.ValueCount()");
59 |
60 | if (!debugger.GetValueAddress(name, out ulong address))
61 | return null;
62 |
63 | double[] values = new double[2];
64 | if (mreader.Read(address, values, converter))
65 | {
66 | return new ExpressionDrawer.Point(values[0], values[1]);
67 | }
68 |
69 | return null;
70 | }
71 |
72 | public override MemoryReader.Converter GetMemoryConverter(MemoryReader mreader,
73 | Debugger debugger, // TODO - remove
74 | string name, string type)
75 | {
76 | string first = name + ".first";
77 | string second = name + ".second";
78 | if (!debugger.GetAddressOffset(name, first, out long firstOffset)
79 | || !debugger.GetAddressOffset(name, second, out long secondOffset)
80 | || !debugger.GetTypeSizeof(firstType, out int firstSize)
81 | || !debugger.GetTypeSizeof(secondType, out int secondSize))
82 | return null;
83 | MemoryReader.ValueConverter firstConverter = mreader.GetNumericConverter(firstType, firstSize);
84 | MemoryReader.ValueConverter secondConverter = mreader.GetNumericConverter(secondType, secondSize);
85 | return firstConverter != null
86 | && secondConverter != null
87 | && debugger.GetTypeSizeof(type, out int sizeOfPair)
88 | && !Debugger.IsInvalidOffset(sizeOfPair, firstOffset, secondOffset)
89 | ? new MemoryReader.StructConverter(
90 | sizeOfPair,
91 | new MemoryReader.Member(firstConverter, (int)firstOffset),
92 | new MemoryReader.Member(secondConverter, (int)secondOffset))
93 | : null;
94 | }
95 |
96 | readonly string firstType;
97 | readonly string secondType;
98 | }
99 |
100 | class StdComplexPoint : BXPoint
101 | {
102 | public class LoaderCreator : ExpressionLoader.ILoaderCreator
103 | {
104 | public bool IsUserDefined() { return false; }
105 | public Kind Kind() { return ExpressionLoader.Kind.Point; }
106 | public Loader Create(Loaders loaders, Debugger debugger, string name, string type, string id)
107 | {
108 | if (id != "std::complex")
109 | return null;
110 |
111 | List tparams = Util.Tparams(type);
112 | if (tparams.Count < 1)
113 | return null;
114 |
115 | return new StdComplexPoint(tparams[0]);
116 | }
117 | }
118 |
119 | private StdComplexPoint(string coordType)
120 | : base("._Val", coordType,
121 | new Geometry.Traits(2, Geometry.CoordinateSystem.Complex, Geometry.Unit.None))
122 | { }
123 | }
124 |
125 | class StdChronoDuration : Value
126 | {
127 | public class LoaderCreator : ExpressionLoader.ILoaderCreator
128 | {
129 | public bool IsUserDefined() { return false; }
130 | public Kind Kind() { return ExpressionLoader.Kind.Value; }
131 | public Loader Create(Loaders loaders, Debugger debugger, string name, string type, string id)
132 | {
133 | if (id != "std::chrono::duration")
134 | return null;
135 |
136 | List tparams = Util.Tparams(type);
137 | if (tparams.Count < 1)
138 | return null;
139 |
140 | return new StdChronoDuration("_MyRep", tparams[0]);
141 | }
142 | }
143 |
144 | private StdChronoDuration(string memberName, string memberType) : base(memberName, memberType)
145 | {}
146 | }
147 | }
148 | }
149 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/VSPackage.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | Graphical Debugging Extension
122 |
123 |
124 | Graphical Debugging Visual Studio Extension allows to view graphical representation of variables, e.g. Boost.Geometry models or vectors of values.
125 |
126 |
127 |
128 | icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
129 |
130 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GeneralOptionControl.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace GraphicalDebugging
2 | {
3 | partial class GeneralOptionControl
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Component Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.checkBoxMemoryAccess = new System.Windows.Forms.CheckBox();
33 | this.groupBoxUserTypes = new System.Windows.Forms.GroupBox();
34 | this.buttonCpp = new System.Windows.Forms.Button();
35 | this.buttonCS = new System.Windows.Forms.Button();
36 | this.textBoxCpp = new System.Windows.Forms.TextBox();
37 | this.textBoxCS = new System.Windows.Forms.TextBox();
38 | this.labelCS = new System.Windows.Forms.Label();
39 | this.labelCpp = new System.Windows.Forms.Label();
40 | this.toolTip = new System.Windows.Forms.ToolTip(this.components);
41 | this.groupBoxUserTypes.SuspendLayout();
42 | this.SuspendLayout();
43 | //
44 | // checkBoxMemoryAccess
45 | //
46 | this.checkBoxMemoryAccess.AutoSize = true;
47 | this.checkBoxMemoryAccess.Checked = true;
48 | this.checkBoxMemoryAccess.CheckState = System.Windows.Forms.CheckState.Checked;
49 | this.checkBoxMemoryAccess.Dock = System.Windows.Forms.DockStyle.Top;
50 | this.checkBoxMemoryAccess.Location = new System.Drawing.Point(0, 0);
51 | this.checkBoxMemoryAccess.Name = "checkBoxMemoryAccess";
52 | this.checkBoxMemoryAccess.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5);
53 | this.checkBoxMemoryAccess.Size = new System.Drawing.Size(370, 27);
54 | this.checkBoxMemoryAccess.TabIndex = 0;
55 | this.checkBoxMemoryAccess.Text = "Enable Direct Memory Access";
56 | this.checkBoxMemoryAccess.UseVisualStyleBackColor = true;
57 | //
58 | // groupBoxUserTypes
59 | //
60 | this.groupBoxUserTypes.Controls.Add(this.buttonCpp);
61 | this.groupBoxUserTypes.Controls.Add(this.buttonCS);
62 | this.groupBoxUserTypes.Controls.Add(this.textBoxCpp);
63 | this.groupBoxUserTypes.Controls.Add(this.textBoxCS);
64 | this.groupBoxUserTypes.Controls.Add(this.labelCS);
65 | this.groupBoxUserTypes.Controls.Add(this.labelCpp);
66 | this.groupBoxUserTypes.Dock = System.Windows.Forms.DockStyle.Top;
67 | this.groupBoxUserTypes.Location = new System.Drawing.Point(0, 27);
68 | this.groupBoxUserTypes.Name = "groupBoxUserTypes";
69 | this.groupBoxUserTypes.Padding = new System.Windows.Forms.Padding(5);
70 | this.groupBoxUserTypes.Size = new System.Drawing.Size(370, 121);
71 | this.groupBoxUserTypes.TabIndex = 1;
72 | this.groupBoxUserTypes.TabStop = false;
73 | this.groupBoxUserTypes.Text = "User Types";
74 | //
75 | // buttonCpp
76 | //
77 | this.buttonCpp.Location = new System.Drawing.Point(289, 36);
78 | this.buttonCpp.Name = "buttonCpp";
79 | this.buttonCpp.Size = new System.Drawing.Size(75, 23);
80 | this.buttonCpp.TabIndex = 4;
81 | this.buttonCpp.Text = "Browse...";
82 | this.buttonCpp.UseVisualStyleBackColor = true;
83 | this.buttonCpp.Click += new System.EventHandler(this.buttonCpp_Click);
84 | //
85 | // buttonCS
86 | //
87 | this.buttonCS.Location = new System.Drawing.Point(288, 84);
88 | this.buttonCS.Name = "buttonCS";
89 | this.buttonCS.Size = new System.Drawing.Size(75, 23);
90 | this.buttonCS.TabIndex = 7;
91 | this.buttonCS.Text = "Browse...";
92 | this.buttonCS.UseVisualStyleBackColor = true;
93 | this.buttonCS.Click += new System.EventHandler(this.buttonCS_Click);
94 | //
95 | // textBoxCpp
96 | //
97 | this.textBoxCpp.Location = new System.Drawing.Point(5, 38);
98 | this.textBoxCpp.Name = "textBoxCpp";
99 | this.textBoxCpp.Size = new System.Drawing.Size(278, 20);
100 | this.textBoxCpp.TabIndex = 3;
101 | //
102 | // textBoxCS
103 | //
104 | this.textBoxCS.Location = new System.Drawing.Point(5, 86);
105 | this.textBoxCS.Name = "textBoxCS";
106 | this.textBoxCS.Size = new System.Drawing.Size(276, 20);
107 | this.textBoxCS.TabIndex = 6;
108 | //
109 | // labelCS
110 | //
111 | this.labelCS.Location = new System.Drawing.Point(5, 63);
112 | this.labelCS.Name = "labelCS";
113 | this.labelCS.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5);
114 | this.labelCS.Size = new System.Drawing.Size(347, 23);
115 | this.labelCS.TabIndex = 5;
116 | this.labelCS.Text = "C#";
117 | //
118 | // labelCpp
119 | //
120 | this.labelCpp.Location = new System.Drawing.Point(5, 15);
121 | this.labelCpp.Name = "labelCpp";
122 | this.labelCpp.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5);
123 | this.labelCpp.Size = new System.Drawing.Size(347, 23);
124 | this.labelCpp.TabIndex = 2;
125 | this.labelCpp.Text = "C++";
126 | //
127 | // GeneralOptionControl
128 | //
129 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
130 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
131 | this.Controls.Add(this.groupBoxUserTypes);
132 | this.Controls.Add(this.checkBoxMemoryAccess);
133 | this.Name = "GeneralOptionControl";
134 | this.Size = new System.Drawing.Size(370, 264);
135 | this.SizeChanged += new System.EventHandler(this.GeneralOptionControl_SizeChanged);
136 | this.groupBoxUserTypes.ResumeLayout(false);
137 | this.groupBoxUserTypes.PerformLayout();
138 | this.ResumeLayout(false);
139 | this.PerformLayout();
140 |
141 | }
142 |
143 | #endregion
144 |
145 | private System.Windows.Forms.CheckBox checkBoxMemoryAccess;
146 | private System.Windows.Forms.GroupBox groupBoxUserTypes;
147 | private System.Windows.Forms.TextBox textBoxCpp;
148 | private System.Windows.Forms.TextBox textBoxCS;
149 | private System.Windows.Forms.Label labelCS;
150 | private System.Windows.Forms.Label labelCpp;
151 | private System.Windows.Forms.Button buttonCpp;
152 | private System.Windows.Forms.Button buttonCS;
153 | private System.Windows.Forms.ToolTip toolTip;
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/BoostGeometry.natvis:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{{m_values[0]}}}
9 |
10 |
11 | 1
12 | m_values
13 |
14 |
15 |
16 |
17 | {{{m_values[0]}, {m_values[1]}}}
18 |
19 |
20 | 2
21 | m_values
22 |
23 |
24 |
25 |
26 | {{{m_values[0]}, {m_values[1]}, {m_values[2]}}}
27 |
28 |
29 | 3
30 | m_values
31 |
32 |
33 |
34 |
35 | {{{m_values[0]}, {m_values[1]}, {m_values[2]}, ...}}
36 |
37 |
38 | $T2
39 | m_values
40 |
41 |
42 |
43 |
44 |
45 |
46 | {{{m_values[0]}, {m_values[1]}}}
47 |
48 |
49 | 2
50 | m_values
51 |
52 |
53 |
54 |
55 |
56 |
57 | {{{m_min_corner}, {m_max_corner}}}
58 |
59 | - m_min_corner
60 | - m_max_corner
61 |
62 |
63 |
64 |
65 |
66 | {{{first}, {second}}}
67 |
68 | - first
69 | - second
70 |
71 |
72 |
73 |
74 |
75 | {{{first}, {second}}}
76 |
77 | - first
78 | - second
79 |
80 |
81 |
82 |
83 |
84 | {{outer={m_outer}, inners={m_inners}}}
85 |
86 | - m_outer
87 | - m_inners
88 |
89 |
90 |
91 |
92 |
93 | {{{m_center}, {m_radius}}}
94 |
95 | - m_center
96 | - m_radius
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 | {m_array,9s}
105 |
106 |
107 | 9
108 | m_array
109 |
110 |
111 |
112 |
113 |
114 |
115 | {m_array,9s}
116 |
117 |
118 | 9
119 | m_array
120 |
121 |
122 |
123 |
124 |
125 |
126 | {$T1,c}, {$T2,c}, {$T3,c}, {$T4,c}, {$T5,c}, {$T6,c}, {$T7,c}, {$T8,c}, {$T9,c}
127 |
128 |
129 |
130 |
131 | ~{(double)m_numerator/(double)m_denominator}
132 |
133 |
134 |
135 |
136 |
137 |
138 | {{ {method} {operations.elems[0].operation}/{operations.elems[1].operation} }}
139 |
140 |
141 |
142 |
143 | {{ {method} {operations.elems[0].operation}/{operations.elems[1].operation} }}
144 |
145 |
146 | *(boost::geometry::detail::overlay::turn_info<$T1,$T2,boost::geometry::detail::overlay::traversal_turn_operation<$T1,$T2>,boost::array<boost::geometry::detail::overlay::traversal_turn_operation<$T1,$T2>,2> >*)this,nd
147 |
148 |
149 |
150 |
151 |
152 |
153 | {{ {operation} at {fraction} }}
154 |
155 |
156 |
157 |
158 | {{ {operation} at {fraction} }}
159 |
160 |
161 | *(boost::geometry::detail::overlay::turn_operation<$T1,$T2>*)this,nd
162 |
163 | - position
164 | - is_collinear
165 |
166 |
167 |
168 |
169 |
170 | {{ {operation} at {fraction} }}
171 |
172 |
173 | *(boost::geometry::detail::overlay::turn_operation<$T1,$T2>*)this,nd
174 |
175 | - enriched
176 | - visited
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 | {{ size = {m_members.values_count} }}
185 |
186 | - m_members.root
187 | - m_members.leafs_level
188 |
189 |
190 |
191 |
192 |
193 | {{ size={m_size} }}
194 |
195 |
196 | m_size
197 | ($T1 *)m_storage.data_.buf
198 |
199 |
200 |
201 |
202 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GraphicalDebuggingPackage.vsct:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
25 |
26 |
33 |
34 |
35 |
37 |
38 |
45 |
52 |
59 |
66 |
67 |
68 |
69 |
70 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/BoostTuple.natvis:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{ size=1 }}
7 |
8 | - head
9 |
10 |
11 |
12 | {{ size=2 }}
13 |
14 | - head
15 | - tail.head
16 |
17 |
18 |
19 | {{ size=3 }}
20 |
21 | - head
22 | - tail.head
23 | - tail.tail.head
24 |
25 |
26 |
27 | {{ size=4 }}
28 |
29 | - head
30 | - tail.head
31 | - tail.tail.head
32 | - tail.tail.tail.head
33 |
34 |
35 |
36 | {{ size=5 }}
37 |
38 | - head
39 | - tail.head
40 | - tail.tail.head
41 | - tail.tail.tail.head
42 | - tail.tail.tail.tail.head
43 |
44 |
45 |
46 | {{ size=6 }}
47 |
48 | - head
49 | - tail.head
50 | - tail.tail.head
51 | - tail.tail.tail.head
52 | - tail.tail.tail.tail.head
53 | - tail.tail.tail.tail.tail.head
54 |
55 |
56 |
57 | {{ size=7 }}
58 |
59 | - head
60 | - tail.head
61 | - tail.tail.head
62 | - tail.tail.tail.head
63 | - tail.tail.tail.tail.head
64 | - tail.tail.tail.tail.tail.head
65 | - tail.tail.tail.tail.tail.tail.head
66 |
67 |
68 |
69 | {{ size=8 }}
70 |
71 | - head
72 | - tail.head
73 | - tail.tail.head
74 | - tail.tail.tail.head
75 | - tail.tail.tail.tail.head
76 | - tail.tail.tail.tail.tail.head
77 | - tail.tail.tail.tail.tail.tail.head
78 | - tail.tail.tail.tail.tail.tail.tail.head
79 |
80 |
81 |
82 | {{ size=9 }}
83 |
84 | - head
85 | - tail.head
86 | - tail.tail.head
87 | - tail.tail.tail.head
88 | - tail.tail.tail.tail.head
89 | - tail.tail.tail.tail.tail.head
90 | - tail.tail.tail.tail.tail.tail.head
91 | - tail.tail.tail.tail.tail.tail.tail.head
92 | - tail.tail.tail.tail.tail.tail.tail.tail.head
93 |
94 |
95 |
96 | {{ size=10 }}
97 |
98 | - head
99 | - tail.head
100 | - tail.tail.head
101 | - tail.tail.tail.head
102 | - tail.tail.tail.tail.head
103 | - tail.tail.tail.tail.tail.head
104 | - tail.tail.tail.tail.tail.tail.head
105 | - tail.tail.tail.tail.tail.tail.tail.head
106 | - tail.tail.tail.tail.tail.tail.tail.tail.head
107 | - tail.tail.tail.tail.tail.tail.tail.tail.tail.head
108 |
109 |
110 |
111 | {{ size>10 }}
112 |
113 | - head
114 | - tail.head
115 | - tail.tail.head
116 | - tail.tail.tail.head
117 | - tail.tail.tail.tail.head
118 | - tail.tail.tail.tail.tail.head
119 | - tail.tail.tail.tail.tail.tail.head
120 | - tail.tail.tail.tail.tail.tail.tail.head
121 | - tail.tail.tail.tail.tail.tail.tail.tail.head
122 | - tail.tail.tail.tail.tail.tail.tail.tail.tail.head
123 |
124 | Next ten elements:
125 |
126 | tail.tail.tail.tail.tail.tail.tail.tail.tail.tail
127 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GraphicalWatchControl.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
45 |
46 |
47 |
50 |
51 |
52 |
56 |
57 |
58 |
82 |
83 |
84 |
85 |
86 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
122 |
123 |
124 |
125 |
126 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
--------------------------------------------------------------------------------
/examples/cpp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
43 |
44 |
50 |
51 |
52 |
53 |
54 | x
55 | y
56 |
57 |
58 |
59 |
68 |
69 |
70 | a[0]
71 | a[1]
72 |
73 |
74 |
75 |
81 |
82 |
83 | x
84 | y
85 |
86 |
87 |
88 |
94 |
95 |
96 | mi
97 | ma
98 |
99 |
100 |
101 |
107 |
108 |
109 | left
110 | bottom
111 | right
112 | top
113 |
114 |
115 |
116 |
122 |
123 |
124 | left
125 | bottom
126 | width
127 | height
128 |
129 |
130 |
131 |
138 |
139 |
140 | first.x
141 | first.y
142 | second.x
143 | second.y
144 |
145 |
146 |
147 |
154 |
155 |
156 | origin.x
157 | origin.y
158 | direction.x
159 | direction.y
160 |
161 |
162 |
163 |
170 |
171 |
172 | first.x
173 | first.y
174 | second.x
175 | second.y
176 |
177 |
178 |
179 |
185 |
186 |
187 |
188 | points
189 |
190 |
191 |
192 |
193 |
198 |
199 |
200 |
201 | (std::vector<$T0,std::allocator<$T0> >&)(*this)
202 |
203 |
204 |
205 |
206 |
213 |
214 |
215 |
216 | begin
217 | end - begin
218 |
219 |
220 |
221 |
222 |
227 |
228 |
229 |
230 | _Mypair._Myval2._Myfirst
231 | _Mypair._Myval2._Mylast - _Mypair._Myval2._Myfirst
232 |
233 |
234 |
235 |
236 |
241 |
242 |
243 |
244 | _Mypair._Myval2._Mysize
245 | _Mypair._Myval2._Myhead->_Next
246 | _Next
247 | _Myval
248 |
249 |
250 |
251 |
252 |
256 |
257 |
258 |
259 | (std::vector<MyPoint,std::allocator<MyPoint> >&)(*this)
260 |
261 |
262 |
263 |
264 |
271 |
272 |
273 | outer
274 |
275 |
276 |
277 | inners
278 |
279 |
280 |
281 |
282 |
283 |
287 |
288 |
289 | (*_Mypair._Myval2._Myfirst)
290 |
291 |
292 |
293 | (std::vector<MyRing,std::allocator<MyRing> >&)(*this)
294 |
295 | 1
296 |
297 |
298 |
299 |
305 |
306 |
307 |
308 | points
309 |
310 |
311 |
312 |
313 |
319 |
320 |
321 |
322 | linestrings
323 |
324 |
325 |
326 |
327 |
333 |
334 |
335 |
336 | polygons
337 |
338 |
339 |
340 |
341 |
347 |
348 |
349 |
350 | rings
351 |
352 |
353 |
354 |
355 |
360 |
361 |
362 | _Mypair._Myval2._Myfirst
363 | _Mypair._Myval2._Mylast - _Mypair._Myval2._Myfirst
364 |
365 |
366 |
367 |
372 |
373 |
374 | _Mypair._Myval2._Mysize
375 | _Mypair._Myval2._Myhead->_Next
376 | _Next
377 | _Myval
378 |
379 |
380 |
381 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/GraphicalDebugging.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 17.0
5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
6 |
7 |
8 | icon.ico
9 |
10 |
11 |
12 | Debug
13 | AnyCPU
14 | 2.0
15 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
16 | {D0630F15-DC04-42D3-9243-50C4377AD857}
17 | Library
18 | Properties
19 | GraphicalDebugging
20 | GraphicalDebugging
21 | v4.7.2
22 | true
23 | true
24 | true
25 | false
26 | false
27 | true
28 | true
29 | Program
30 | $(DevEnvDir)devenv.exe
31 | /rootsuffix Exp
32 |
33 |
34 | true
35 | full
36 | false
37 | bin\Debug\
38 | DEBUG;TRACE
39 | prompt
40 | 4
41 |
42 |
43 | pdbonly
44 | true
45 | bin\Release\
46 | TRACE
47 | prompt
48 | 4
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | UserControl
63 |
64 |
65 | GeneralOptionControl.cs
66 |
67 |
68 | Component
69 |
70 |
71 |
72 |
73 |
74 | GeometryWatchControl.xaml
75 |
76 |
77 | Component
78 |
79 |
80 |
81 |
82 | GraphicalWatchControl.xaml
83 |
84 |
85 | Component
86 |
87 |
88 |
89 | LoadingWindow.xaml
90 |
91 |
92 |
93 |
94 |
95 | PlotWatchControl.xaml
96 |
97 |
98 | Component
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 | Designer
109 |
110 |
111 |
112 |
113 | true
114 |
115 |
116 | true
117 |
118 |
119 | true
120 |
121 |
122 | true
123 |
124 |
125 | true
126 |
127 |
128 | Always
129 | true
130 |
131 |
132 |
133 |
134 | Menus.ctmenu
135 |
136 |
137 | true
138 |
139 |
140 | true
141 |
142 |
143 | true
144 |
145 |
146 | Always
147 | true
148 |
149 |
150 | Always
151 | true
152 |
153 |
154 | Always
155 | true
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 | Designer
165 | MSBuild:Compile
166 |
167 |
168 | Designer
169 | MSBuild:Compile
170 |
171 |
172 | Designer
173 | MSBuild:Compile
174 |
175 |
176 | Designer
177 | MSBuild:Compile
178 |
179 |
180 |
181 |
182 | 17.0.3041101
183 |
184 |
185 |
186 |
187 |
188 |
189 | GeneralOptionControl.cs
190 |
191 |
192 | true
193 | VSPackage
194 | Designer
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
217 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/ExpressionLoader_Util.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using EnvDTE;
8 |
9 | using System;
10 | using System.Collections.Generic;
11 | using System.Text.RegularExpressions;
12 |
13 | namespace GraphicalDebugging
14 | {
15 | partial class ExpressionLoader
16 | {
17 | class LoadTimeGuard
18 | {
19 | public LoadTimeGuard(string variableName, long timeThreshold)
20 | {
21 | this.variableName = variableName;
22 | this.timeThreshold = timeThreshold;
23 |
24 | this.messagePrefix = "Loading expression: \"" + variableName + "\"\r\nElapsed time: ";
25 | this.messagePostfix = " sec.\r\n" + "You can stop it by clicking the button below.";
26 |
27 | stopWatch.Start();
28 | }
29 |
30 | public void ThrowOnCancel()
31 | {
32 | if (stopWatch.ElapsedMilliseconds > timeThreshold)
33 | {
34 | if (! windowCreated)
35 | {
36 | windowCreated = true;
37 | IntPtr mainWindowHandle = Util.GetWindowHandle(System.Windows.Application.Current.MainWindow);
38 | System.Threading.Thread thread = new System.Threading.Thread(() =>
39 | {
40 | LoadingWindow w = new LoadingWindow
41 | {
42 | Title = "Loading takes much time."
43 | };
44 | w.Show();
45 | w.Closed += (sender2, e2) => w.Dispatcher.InvokeShutdown();
46 | IntPtr wHandle = Util.GetWindowHandle(w);
47 | IntPtr r = IntPtr.Zero;
48 | if (wHandle != IntPtr.Zero && mainWindowHandle != IntPtr.Zero)
49 | r = Util.SetWindowOwner(wHandle, mainWindowHandle);
50 | if (r == IntPtr.Zero)
51 | w.Topmost = true;
52 | window = w;
53 | System.Windows.Threading.Dispatcher.Run();
54 | });
55 | thread.SetApartmentState(System.Threading.ApartmentState.STA);
56 | thread.Start();
57 | }
58 |
59 | // Is mutex needed here to check the reference?
60 | if (windowCreated && window != null)
61 | {
62 | long elapsedSeconds = stopWatch.ElapsedMilliseconds / 1000;
63 | string messageBoxText = messagePrefix + elapsedSeconds + messagePostfix;
64 |
65 | bool result = true;
66 | try
67 | {
68 | window.Dispatcher.Invoke(() =>
69 | {
70 | if (window.IsClosed) // just in case
71 | result = false;
72 | else
73 | window.LoadingTextBlock.Text = messageBoxText;
74 | });
75 | }
76 | catch (System.Threading.Tasks.TaskCanceledException)
77 | {
78 | result = false;
79 | }
80 |
81 | if (result == false)
82 | {
83 | windowCreated = false;
84 | window = null;
85 | // This also means that the thread already finished
86 | // or will do it in the near future because window
87 | // closing shuts down the dispatcher.
88 | throw new Exception("Cancelled");
89 | }
90 | }
91 | }
92 | }
93 |
94 | public void Reset()
95 | {
96 | if (windowCreated && window != null)
97 | window.Dispatcher.Invoke(() => window.Close());
98 | windowCreated = false;
99 | window = null;
100 | }
101 |
102 | readonly string variableName;
103 | readonly long timeThreshold;
104 | readonly string messagePrefix;
105 | readonly string messagePostfix;
106 |
107 | bool windowCreated = false;
108 | LoadingWindow window = null;
109 |
110 | readonly System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch();
111 | }
112 |
113 | class TypeInfo
114 | {
115 | public TypeInfo(Debugger debugger, string name)
116 | {
117 | Type = debugger.GetValueType(name);
118 | IsValid = Type != null
119 | && debugger.GetTypeSizeof(Type, out Size);
120 | }
121 |
122 | public string Type = null;
123 | public int Size = 0;
124 | public bool IsValid = false;
125 | }
126 |
127 | class MemberInfo : TypeInfo
128 | {
129 | public MemberInfo(Debugger debugger, string baseName, string memberName)
130 | : base(debugger, memberName)
131 | {
132 | IsValid = IsValid
133 | && debugger.GetAddressOffset(baseName, memberName, out Offset);
134 | }
135 |
136 | public long Offset;
137 | }
138 |
139 | class VariableInfo : TypeInfo
140 | {
141 | public VariableInfo(Debugger debugger, string name)
142 | : base(debugger, name)
143 | {
144 | IsValid = IsValid
145 | && debugger.GetValueAddress(name, out Address);
146 | }
147 |
148 | public ulong Address;
149 | }
150 |
151 | interface ITypeMatcher
152 | {
153 | bool MatchType(string type, string id);
154 | }
155 |
156 | class DummyMatcher : ITypeMatcher
157 | {
158 | public bool MatchType(string type, string id)
159 | {
160 | return true;
161 | }
162 | }
163 |
164 | class IdMatcher : ITypeMatcher
165 | {
166 | public IdMatcher(string id) { this.id = id; }
167 |
168 | public bool MatchType(string type, string id)
169 | {
170 | return id == this.id;
171 | }
172 |
173 | readonly string id;
174 | }
175 |
176 | class TypeMatcher : ITypeMatcher
177 | {
178 | public TypeMatcher(string type) { this.type = type; }
179 |
180 | public bool MatchType(string type, string id)
181 | {
182 | return type == this.type;
183 | }
184 |
185 | readonly string type;
186 | }
187 |
188 | class TypePatternMatcher : ITypeMatcher
189 | {
190 | public TypePatternMatcher(string pattern)
191 | {
192 | string tmp = PreprocessPattern(pattern);
193 | this.pattern = tmp.Replace("*", "(.+)");
194 | if (this.pattern != tmp)
195 | this.regex = new Regex(this.pattern, RegexOptions.CultureInvariant);
196 | }
197 |
198 | public bool MatchType(string type, string id)
199 | {
200 | return regex != null
201 | ? regex.IsMatch(type)
202 | : type == pattern;
203 | }
204 |
205 | // From
206 | // A::B < C::D < E< F>>>
207 | // To
208 | // A::B > >
209 | static string PreprocessPattern(string str)
210 | {
211 | string result = "";
212 | char lastNonSpace = ' ';
213 | for (int i = 0; i < str.Length; ++i)
214 | {
215 | char c = str[i];
216 | if (c != ' ' && c != '\t')
217 | {
218 | if (lastNonSpace == '>' && c == '>')
219 | result += ' ';
220 | result += c;
221 | lastNonSpace = c;
222 | }
223 | }
224 | return result;
225 | }
226 |
227 | readonly string pattern;
228 | readonly Regex regex;
229 | }
230 |
231 | static string StdContainerType(string containerId, string elementType, string allocatorId)
232 | {
233 | return Util.TemplateType(containerId,
234 | elementType,
235 | Util.TemplateType(allocatorId,
236 | elementType));
237 | }
238 |
239 | static void GetBGContainerInfo(string type,
240 | int pointTIndex,
241 | int containerTIndex,
242 | int allocatorTIndex,
243 | out string elementType,
244 | out string containerType)
245 | {
246 | elementType = "";
247 | containerType = "";
248 |
249 | List tparams = Util.Tparams(type);
250 | if (tparams.Count <= Math.Max(Math.Max(pointTIndex, containerTIndex), allocatorTIndex))
251 | return;
252 |
253 | elementType = tparams[pointTIndex];
254 | containerType = StdContainerType(tparams[containerTIndex],
255 | elementType,
256 | tparams[allocatorTIndex]);
257 | }
258 | }
259 | }
260 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/Debugger.cs:
--------------------------------------------------------------------------------
1 | using EnvDTE;
2 | using Microsoft.VisualStudio.Shell;
3 |
4 | namespace GraphicalDebugging
5 | {
6 | public class Expression
7 | {
8 | public string Name;
9 | public string Type;
10 | public string Value;
11 | public bool IsValid;
12 | }
13 |
14 | class Debugger
15 | {
16 | public Debugger(DTE dte)
17 | {
18 | this.debugger = dte.Debugger;
19 | }
20 |
21 | // TODO: return uint
22 | public bool TryLoadUInt(string name, out int result)
23 | {
24 | return TryLoadInt(name, out result)
25 | && result >= 0;
26 | }
27 |
28 | public bool TryLoadInt(string name, out int result)
29 | {
30 | result = 0;
31 | var expr = debugger.GetExpression(name);
32 | return expr.IsValidValue
33 | && Util.TryParseInt(expr.Value, debugger.HexDisplayMode, out result);
34 | }
35 |
36 | public bool TryLoadDouble(string name, out double result)
37 | {
38 | result = 0.0;
39 | string castedName = !IsLanguageBasic
40 | ? "(double)(" + name + ")"
41 | : "CType(" + name + ", Double)";
42 | var expr = debugger.GetExpression(castedName);
43 | return expr.IsValidValue
44 | && Util.TryParseDouble(expr.Value, out result);
45 | }
46 |
47 | public bool TryLoadBool(string name, out bool result)
48 | {
49 | result = false;
50 | var expr = debugger.GetExpression("(" + name + ") == true)");
51 | if (!expr.IsValidValue)
52 | return false;
53 | result = (expr.Value == "true" || expr.Value == "1");
54 | return true;
55 | }
56 |
57 | // TODO: take size to check against out of bounds
58 | // TODO: return ulong?
59 | // Difference of addresses of variables valName1 and valName2
60 | // Returns false if addresses cannot be loaded, parsed, any of them is equal to 0 or offset is < 0
61 | // In these cases result is negative
62 | public bool GetAddressOffset(string valName1, string valName2, out long result)
63 | {
64 | result = long.MinValue;
65 | if (GetValueAddress(valName1, out ulong addr1)
66 | && GetValueAddress(valName2, out ulong addr2)
67 | && addr2 >= addr1)
68 | {
69 | result = (long)(addr2 - addr1);
70 | return true;
71 | }
72 | return false;
73 | }
74 |
75 | // TODO: take size to check against out of bounds
76 | // TODO: return ulong?
77 | // Returns false if addresses cannot be loaded, parsed, any of them is equal to 0 or offset is < 0
78 | // In these cases result is negative
79 | public bool GetPointerOffset(string pointerName1, string pointerName2, out long result)
80 | {
81 | result = long.MinValue;
82 | if (GetPointer(pointerName1, out ulong addr1)
83 | && GetPointer(pointerName2, out ulong addr2)
84 | && addr2 >= addr1)
85 | {
86 | result = (long)(addr2 - addr1);
87 | return true;
88 | }
89 | return false;
90 | }
91 |
92 | // C++ and C# only!
93 |
94 | // TODO: C# classes
95 | // For value-types, structs, etc.
96 | // "typeof(" + type + ").IsValueType" == "true"
97 | // "&(" + name + ")" is of type SomeType*
98 | // - address: "&(" + name + ")"
99 | // - size: "sizeof(" + type + ")"
100 | // For non-value-types, e.g. classes
101 | // "typeof(" + type + ").IsValueType" == "false"
102 | // "&(" + name + ")" is of type IntPtr*
103 | // - address: "*(&(" + name + "))"
104 | // - size: "System.Runtime.InteropServices.Marshal.ReadInt32(typeof(" + type + ").TypeHandle.Value, 4)"
105 | // - size: "*(((int*)(void*)typeof(" + type + ").TypeHandle.Value) + 1)"
106 |
107 | // Value of pointer, aka address pointed to
108 | // Returns false if address cannot be loaded, parsed or if it is equal to 0
109 | public bool GetPointer(string pointerName, out ulong result)
110 | {
111 | var genericPtrExpr = debugger.GetExpression("(void*)(" + pointerName + ")");
112 | if (genericPtrExpr.IsValidValue)
113 | {
114 | return Util.TryParseULong(genericPtrExpr.Value, out result) && result != 0;
115 | }
116 |
117 | // fallback for c#
118 | var elementPtrExpr = debugger.GetExpression(pointerName);
119 | if (elementPtrExpr.IsValidValue)
120 | {
121 | return Util.TryParseULong(elementPtrExpr.Value, out result) && result != 0;
122 | }
123 |
124 | result = 0;
125 | return false;
126 | }
127 |
128 | // Address of variable
129 | // Returns false if address cannot be loaded, parsed or if it is equal to 0
130 | public bool GetValueAddress(string valName, out ulong result)
131 | {
132 | return GetPointer("&(" + valName + ")", out result);
133 | }
134 |
135 | // NOTE: In C++ the actual byte size depends on CHAR_BIT
136 | // Returns false if size of variable cannot be loaded, parsed or if it is <= 0
137 | public bool GetValueSizeof(string valName, out int result)
138 | {
139 | result = 0;
140 | string typeName = valName; // In C++ value and type is interchangeable when passed into sizeof
141 | //if (!IsLanguageCpp)
142 | if (IsLanguageCs) // Change this when getting address in Basic works
143 | {
144 | var valExpr = debugger.GetExpression(valName);
145 | if (!valExpr.IsValidValue)
146 | return false;
147 | typeName = valExpr.Type;
148 | }
149 | return GetTypeSizeof(typeName, out result);
150 | }
151 |
152 | // Returns false if size of type cannot be loaded, parsed or if it is <= 0
153 | public bool GetTypeSizeof(string valType, out int result)
154 | {
155 | result = 0;
156 | if (IsLanguageBasic) // Change this when getting address in Basic works
157 | //sizeOfStr = "System.Runtime.InteropServices.Marshal.SizeOf(GetType(" + valType + "))";
158 | return false;
159 | string sizeOfStr = "sizeof(" + valType + ")";
160 | var valSizeExpr = debugger.GetExpression(sizeOfStr);
161 | return valSizeExpr.IsValidValue
162 | && Util.TryParseInt(valSizeExpr.Value, debugger.HexDisplayMode, out result)
163 | && result > 0;
164 | }
165 |
166 | // Returns false if size of type cannot be loaded, parsed or if it is <= 0
167 | public bool GetCppSizeof(string valNameOrType, out int result)
168 | {
169 | result = 0;
170 | string sizeOfStr = "sizeof(" + valNameOrType + ")";
171 | var valSizeExpr = debugger.GetExpression(sizeOfStr);
172 | return valSizeExpr.IsValidValue
173 | && Util.TryParseInt(valSizeExpr.Value, debugger.HexDisplayMode, out result)
174 | && result > 0;
175 | }
176 |
177 | // Valid type name or null
178 | public string GetValueType(string valName)
179 | {
180 | var valExpr = debugger.GetExpression(valName);
181 | if (!valExpr.IsValidValue)
182 | return null;
183 | if (IsLanguageCpp)
184 | return Util.CppNormalizeType(valExpr.Type);
185 | else
186 | return valExpr.Type;
187 | }
188 |
189 | // Valid value or null
190 | public string GetValue(string valName)
191 | {
192 | var valExpr = debugger.GetExpression(valName);
193 | return valExpr.IsValidValue
194 | ? valExpr.Value
195 | : null;
196 | }
197 |
198 | public Expression GetExpression(string valName)
199 | {
200 | var expr = debugger.GetExpression(valName);
201 | Expression result = new Expression
202 | {
203 | Name = expr.Name,
204 | Value = expr.Value,
205 | IsValid = expr.IsValidValue
206 | };
207 | if (IsLanguageCpp)
208 | result.Type = Util.CppNormalizeType(expr.Type);
209 | else
210 | result.Type = expr.Type;
211 | return result;
212 | }
213 |
214 | public bool ValueExists(string valName)
215 | {
216 | return debugger.GetExpression(valName).IsValidValue;
217 | }
218 |
219 | public static bool IsInvalidType(string type)
220 | {
221 | return string.IsNullOrEmpty(type);
222 | }
223 |
224 | public static bool IsInvalidType(string type1, string type2)
225 | {
226 | return string.IsNullOrEmpty(type1) || string.IsNullOrEmpty(type2);
227 | }
228 |
229 | public static bool IsInvalidOffset(long size, long offset)
230 | {
231 | return offset < 0 || offset >= size;
232 | }
233 |
234 | public static bool IsInvalidOffset(long size, long offset1, long offset2)
235 | {
236 | return IsInvalidOffset(size, offset1)
237 | || IsInvalidOffset(size, offset2);
238 | }
239 |
240 | public string CurrentProcessName
241 | {
242 | get { return debugger.CurrentProcess.Name; }
243 | }
244 |
245 | public bool IsBreakMode
246 | {
247 | get { return debugger.CurrentMode == dbgDebugMode.dbgBreakMode; }
248 | }
249 |
250 | public bool IsLanguageCpp
251 | {
252 | get { return debugger.CurrentStackFrame.Language == "C++"; }
253 | }
254 |
255 | public bool IsLanguageCs
256 | {
257 | get { return debugger.CurrentStackFrame.Language == "C#"; }
258 | }
259 |
260 | public bool IsLanguageBasic
261 | {
262 | get { return debugger.CurrentStackFrame.Language == "Basic"; }
263 | }
264 |
265 | readonly EnvDTE.Debugger debugger;
266 | }
267 | }
268 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/ClassScopeExpression.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // Copyright (c) Adam Wulkiewicz.
4 | //
5 | //------------------------------------------------------------------------------
6 |
7 | using EnvDTE;
8 |
9 | using System;
10 | using System.Collections.Generic;
11 | using System.Linq;
12 | using System.Text;
13 | using System.Text.RegularExpressions;
14 | using System.Threading.Tasks;
15 |
16 | namespace GraphicalDebugging
17 | {
18 | class ClassScopeExpression
19 | {
20 | public ClassScopeExpression()
21 | {
22 | mParts = new List();
23 | }
24 |
25 | public ClassScopeExpression(IPart part)
26 | {
27 | mParts = new List();
28 | Add(part);
29 | }
30 |
31 | public ClassScopeExpression(string expression)
32 | {
33 | mParts = ParseImpl(expression);
34 | }
35 |
36 | void Add(IPart part)
37 | {
38 | mParts.Add(part);
39 | }
40 |
41 | public void Reinitialize(Debugger debugger, string name, string type)
42 | {
43 | foreach (IPart part in mParts)
44 | part.Reinitialize(debugger, name, type);
45 | }
46 |
47 | public string GetString(string name)
48 | {
49 | string result = "(";
50 | foreach (IPart part in mParts)
51 | result += part.GetString(name);
52 | return result + ")";
53 | }
54 |
55 | public ClassScopeExpression DeepCopy()
56 | {
57 | ClassScopeExpression res = new ClassScopeExpression();
58 | res.mParts.Capacity = mParts.Count;
59 | foreach (IPart p in mParts)
60 | res.mParts.Add(p.DeepCopy());
61 | return res;
62 | }
63 |
64 | public interface IPart
65 | {
66 | void Reinitialize(Debugger debugger, string name, string type);
67 | string GetString(string name);
68 | IPart DeepCopy();
69 | }
70 |
71 | public class StringPart : IPart
72 | {
73 | public StringPart(string value) { mValue = value; }
74 |
75 | public void Reinitialize(Debugger debugger, string name, string type)
76 | { }
77 |
78 | public string GetString(string name)
79 | {
80 | return mValue;
81 | }
82 |
83 | public IPart DeepCopy()
84 | {
85 | return new StringPart(mValue);
86 | }
87 |
88 | readonly string mValue;
89 | }
90 |
91 | // TODO: Possible members may be used multiple times in an expression.
92 | // Consider keeping a dictionary to avoid multiple checks for
93 | // the same identifier.
94 | public class PossibleMemberPart : IPart
95 | {
96 | public PossibleMemberPart(string identifier)
97 | {
98 | mIdentifier = identifier;
99 | mValue = mIdentifier;
100 | mKind = Kind.Unknown;
101 | }
102 |
103 | public void Reinitialize(Debugger debugger, string name, string type)
104 | {
105 | mValue = mIdentifier;
106 | mKind = Kind.Unknown;
107 |
108 | // The same check in both C++ and C#
109 | string memVar = "(" + name + ")." + mIdentifier;
110 | if (debugger.ValueExists(memVar))
111 | {
112 | mKind = Kind.MemberVariable;
113 | return;
114 | }
115 |
116 | string memType = "";
117 | string memTypeCheck = "";
118 | if (debugger.IsLanguageCpp)
119 | {
120 | memType = type + "::" + mIdentifier;
121 | memTypeCheck = "(" + memType + "*)0";
122 | }
123 | else if (debugger.IsLanguageCs)
124 | {
125 | // TODO: TEST IT
126 | memType = type + "." + mIdentifier;
127 | memTypeCheck = "(" + memType + " is object)";
128 | }
129 |
130 | if (debugger.ValueExists(memTypeCheck))
131 | {
132 | // Type name is constant for breakpoint
133 | mValue = memType;
134 | mKind = Kind.MemberType;
135 | return;
136 | }
137 | }
138 |
139 | public string GetString(string name)
140 | {
141 | return mKind == Kind.MemberVariable
142 | ? "(" + name + ")." + mIdentifier
143 | : mValue;
144 | }
145 |
146 | public IPart DeepCopy()
147 | {
148 | PossibleMemberPart part = new PossibleMemberPart(mIdentifier)
149 | {
150 | mValue = mValue,
151 | mKind = mKind
152 | };
153 | return part;
154 | }
155 |
156 | readonly string mIdentifier;
157 |
158 | string mValue; // member type or global variable/type
159 | enum Kind { Unknown, MemberVariable, MemberType };
160 | Kind mKind;
161 | }
162 |
163 | public class ThisPart : IPart
164 | {
165 | public ThisPart() { }
166 |
167 | public void Reinitialize(Debugger debugger, string name, string type)
168 | {
169 | mIsCxx = debugger.IsLanguageCpp;
170 | }
171 |
172 | public string GetString(string name)
173 | {
174 | return mIsCxx
175 | ? "(&(" + name + "))"
176 | : name;
177 | }
178 |
179 | public IPart DeepCopy()
180 | {
181 | ThisPart part = new ThisPart
182 | {
183 | mIsCxx = mIsCxx
184 | };
185 | return part;
186 | }
187 |
188 | bool mIsCxx = false;
189 | }
190 |
191 | public class NamePart : IPart
192 | {
193 | public NamePart() { }
194 |
195 | public void Reinitialize(Debugger debugger, string name, string type) { }
196 |
197 | public string GetString(string name)
198 | {
199 | return name;
200 | }
201 |
202 | public IPart DeepCopy()
203 | {
204 | return new NamePart();
205 | }
206 | }
207 |
208 | public class TParamPart : IPart
209 | {
210 | public TParamPart(int index)
211 | {
212 | this.tparam = "";
213 | this.index = index;
214 | }
215 |
216 | public void Reinitialize(Debugger debugger, string name, string type)
217 | {
218 | List tparams = Util.Tparams(type);
219 | // Or throw an exception
220 | if (0 <= index && index < tparams.Count)
221 | tparam = tparams[index];
222 | else
223 | tparam = "";
224 | }
225 |
226 | public string GetString(string name)
227 | {
228 | return tparam;
229 | }
230 |
231 | public IPart DeepCopy()
232 | {
233 | TParamPart part = new TParamPart(index)
234 | {
235 | tparam = tparam
236 | };
237 | return part;
238 | }
239 |
240 | string tparam;
241 | readonly int index;
242 | }
243 |
244 | // NOTE: This is not an implementation of a compiler.
245 | // Expressions are analysed in a simplified way,
246 | // i.e. the first identifier in a chain of members is analysed
247 | // this means that things like this are not taken into account:
248 | // - member.Base::base_member
249 | // use ((Base &)member).base_member instead
250 | // - u"abc"
251 | // do not use
252 | // - MemberTemplate<>
253 | // do not use
254 | // a quick test shows that they don't work in Watch window anyway
255 | // - more?
256 |
257 | const string id = @"((\w|_)(\w|\d|_)*)";
258 | const string tpar = @"(\$T\d+)";
259 | const string op = @"((::)|(\.)|(->)|(\.\*)|(->\*))";
260 | const string opIdOrId = @"(" + op + @"\s*" + id + ")|" + id + "|" + tpar;
261 | static readonly Regex regex = new Regex(opIdOrId, RegexOptions.CultureInvariant);
262 |
263 | List ParseImpl(string expression)
264 | {
265 | List result = new List();
266 |
267 | MatchCollection matches = regex.Matches(expression);
268 |
269 | int last = 0;
270 |
271 | foreach (Match match in matches)
272 | {
273 | // ignore matches with leading operators
274 | char c = expression[match.Index];
275 | if (c == ':' || c == '.' || c == '-')
276 | continue;
277 |
278 | if (last < match.Index)
279 | {
280 | string s = expression.Substring(last, match.Index - last);
281 | result.Add(new StringPart(s));
282 | }
283 |
284 | {
285 | string s = expression.Substring(match.Index, match.Length);
286 | if (s == "this")
287 | result.Add(new ThisPart());
288 | else if (s.Length > 2 && s[0] == '$' && s[1] == 'T')
289 | {
290 | if (Util.TryParseInt(s.Substring(2), out int index))
291 | result.Add(new TParamPart(index));
292 | }
293 | else
294 | result.Add(new PossibleMemberPart(s));
295 | }
296 |
297 | last = match.Index + match.Length;
298 | }
299 |
300 | if (last < expression.Length)
301 | {
302 | string s = expression.Substring(last);
303 | result.Add(new StringPart(s));
304 | }
305 |
306 | return result;
307 | }
308 |
309 | readonly List mParts;
310 | }
311 | }
312 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Graphical Debugging
2 | ### Extension for Visual Studio
3 |
4 | [](https://marketplace.visualstudio.com/items?itemName=AdamWulkiewicz.GraphicalDebugging)
5 | [](https://marketplace.visualstudio.com/items?itemName=AdamWulkiewicz.GraphicalDebugging)
6 | [](https://marketplace.visualstudio.com/items?itemName=AdamWulkiewicz.GraphicalDebugging)
7 | 
8 | [](https://awulkiew.github.io/donate)
9 |
10 | This extension allows to display graphical representation of C++ and C# variables during debugging.
11 |
12 | 
13 |
14 | It supports Boost.Geometry and Boost.Polygon models, Boost.Variant, STL/Boost containers of values and points, C-style arrays, C# arrays, List and LinkedList as well as user-defined geometry types. The extension has the following components:
15 |
16 | * **Debugger visualizers** for Boost.Array, Boost.CircularBuffer, Boost.Container, Boost.Geometry, Boost.MPL, Boost.Polygon, Boost.Tuple and Boost.Variant
17 | * **Geometry Watch** tool window displaying geometries in a common coordinate system, e.g. Boost.Geometry, Boost.Polygon polygons, etc.
18 | * **Graphical Watch** tool window displaying graphical representation of variables, e.g. Boost.Geometry models, Boost.Gil images, vectors of values, etc.
19 | * **Plot Watch** tool window displaying plot representation of variables, e.g. vector of doubles, array of pairs, etc.
20 |
21 | Feel free to report bugs, propose features and create pull requests. Any help is appreciated.
22 |
23 | #### Download
24 |
25 | You can download this extension from [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=AdamWulkiewicz.GraphicalDebugging) or [GitHub](https://github.com/awulkiew/graphical-debugging/releases).
26 |
27 | #### Supported Versions
28 |
29 | Visual Studio 2013, 2015, 2017 and 2019 - [version 0.34](https://github.com/awulkiew/graphical-debugging/releases/tag/v0.34) or [newer version backported by Murkas94](https://github.com/Murkas94/graphical-debugging-pre-vs2022/releases)
30 |
31 | Visual Studio 2022 - [version 0.50 and newer](https://github.com/awulkiew/graphical-debugging/releases)
32 |
33 | #### Instructions
34 |
35 | 1. place a breakpoint somewhere in the code
36 | 2. start debugging
37 | 3. after a breakpoint hit enable the tool window from the menu
38 | * **View**->**Other Windows**->**Geometry Watch**
39 | * **View**->**Other Windows**->**Graphical Watch**
40 | * **View**->**Other Windows**->**Plot Watch**
41 | 4. write the name of a variable in an edit box on the list
42 |
43 | #### Debugger visualizers
44 |
45 | 
46 |
47 | Supported:
48 |
49 | * Boost.Array: `array`
50 | * Boost.CircularBuffer: `circular_buffer`
51 | * Boost.Container: `vector`, `static_vector`
52 | * Boost.Geometry:
53 | * `de9im`: `mask`, `matrix`, `static_mask`
54 | * `index`: `rtree`
55 | * `model`: `point`, `point_xy`, `box`, `segment`, `referring_segment`, `linestring`, `polygon`, `multi_point`, `multi_linestring`, `multi_polygon`, `nsphere`
56 | * Boost.MPL: `int_`, `size_t`, `integral_c`, `vector`, `vector_c`
57 | * Boost.Polygon: `point_data`, `interval_data`, `segment_data`, `rectangle_data`, `polygon_data`, `polygon_with_holes_data`
58 | * Boost.Tuple: `tuple`
59 | * Boost.Variant: `variant`
60 |
61 | #### Geometry Watch
62 |
63 | Watch window displaying graphical representation of variables in a single image. This allows to compare the variables easily. Variables can be of any supported type (see below) representing a geometrical object, e.g. point, polygon, ray, container of complex numbers, etc.
64 |
65 | 
66 |
67 | Geometries in spherical_equatorial and geographic coordinate systems are displayed in a way allowing to see what coordinates were used to define a geometry. Note that various libraries may require coordinates in a certain range. This extension tries to display any coordinates as good as possible.
68 |
69 | Segments may be densified in order to reflect the curvature of the globe. This behavior is enabled by default but can be disabled in **Tools**->**Options**->**Graphical Debugging**->**Geometry Watch**.
70 |
71 | 
72 |
73 | where geometries are Boost.Geometry types:
74 |
75 | polygon_sd_t poly_sd{{{-100, 0},{100, 0},{100, 50},{-100, 50},{-100, 0}},
76 | {{-150, 10},{-150, 20},{150, 20},{150, 10},{-150, 10}}};
77 | multi_polygon_sd_t mpoly_sd{{{{0, 0},{90, 10},{170, 20},{-170, 30},{-150, 60}},
78 | {{0, 10},{-15, 20},{-50, 50},{0, 60}}}};
79 | multi_point_sd_t mpt_sd{{0, 0},{90, 10},{170, 20},{-170, 30}};
80 |
81 | #### Graphical Watch
82 |
83 | Watch window displaying graphical representations of variables in a list. Each variable is placed and visualized in a separate row. Variables can be of any supported type (see below) incl. images (see below).
84 |
85 | 
86 |
87 | Geometries in spherical_equatorial and geographic coordinate systems are displayed in a convenient, compact way.
88 |
89 | Segments may be densified in order to reflect the curvature of the globe. This behavior is enabled by default but can be disabled in **Tools**->**Options**->**Graphical Debugging**->**Graphical Watch**.
90 |
91 | 
92 |
93 | where
94 |
95 | polygon_sd_t poly_sd{{{-100, 0},{100, 0},{100, 50},{-100, 50},{-100, 0}},
96 | {{-150, 10},{-150, 20},{150, 20},{150, 10},{-150, 10}}};
97 | multi_polygon_sd_t mpoly_sd{{{{0, 0},{90, 10},{170, 20},{-170, 30},{-150, 60}},
98 | {{0, 10},{-15, 20},{-50, 50},{0, 60}}}};
99 | multi_point_sd_t mpt_sd{{0, 0},{90, 10},{170, 20},{-170, 30}};
100 |
101 | #### Plot Watch
102 |
103 | Watch window displaying plot representation of variables in a single image. Type of plot can be set in **Options**. Variables can be of any supported type (see below) representing a container of values or points incl. complex and pair.
104 |
105 | 
106 |
107 | #### Supported types
108 |
109 | * Containers of values convertible to double, points and other geometries
110 | * C-style array
111 | * Pointer to elements with size specifier e.g.: `ptr,5`
112 | * Sequence of containers of point coordinates e.g.: `vec_x;vec_y`
113 | * STL: `array`, `vector`, `deque`, `list`, `set`
114 | * Boost.Array: `array`
115 | * Boost.CircularBuffer: `circular_buffer`
116 | * Boost.Container: `vector`, `static_vector`
117 | * C#: array, `List`, `LinkedList`, `IList`, `IEnumerable`
118 | * VB: array, `List` (containers of values only)
119 | * user-defined containers (see below)
120 | * 2D cartesian geometries
121 | * Boost.Geometry: `point`, `point_xy`, `box`, `segment`, `referring_segment`, `linestring`, `polygon`, `multi_point`, `multi_linestring`, `multi_polygon`, `nsphere`
122 | * Boost.Polygon: `point_data`, `segment_data`, `rectangle_data`, `polygon_data`, `polygon_with_holes_data`
123 | * STL: `pair`
124 | * user-defined geometry types (see below)
125 | * Non-cartesian geometries (spherical_equatorial and geographic)
126 | * Boost.Geometry: `point`, `box`, `segment`, `referring_segment`, `linestring`, `polygon`, `multi_point`, `multi_linestring`, `multi_polygon`, `nsphere`
127 | * Spatial indexes
128 | * Boost.Geometry: `rtree`
129 | * Complex numbers
130 | * STL: `complex`
131 | * Values
132 | * STL: `chrono::duration` (incl. aliases, e.g. `chrono::milliseconds`, `chrono::seconds`, etc.)
133 | * Images
134 | * Boost.Gil: `image` (incl. aliases, e.g. `rgb8_image_t`, `abgr16_image_t`, `cmyk32_image_t`, `rgb64f_planar_image_t`, etc.)
135 | * Variants of geometries
136 | * Boost.Variant: `variant`
137 |
138 | #### User-defined types
139 |
140 | The extension offers support for the following user-defined geometries for both C++ and C# types:
141 |
142 | * `Box` (aka rectangle)
143 | * `Line`
144 | * `Linestring`
145 | * `MultiLinestring`
146 | * `MultiPoint`
147 | * `MultiPolygon`
148 | * `Point`
149 | * `Polygon` (polygon with holes)
150 | * `Ray`
151 | * `Ring` (polygon without holes)
152 | * `Segment`
153 |
154 | as well as user defined containers for C++:
155 |
156 | * `Array`
157 | * `LinkedList`
158 |
159 | They can be defined in XML file similar to *.natvis file. Path to this file can be set in options under **Tools**->**Options**->**Graphical Debugging**->**General**. An example XML file defining C++ types `MyPoint`, `MyRing` and `MyPolygon` in global namespace might look like this:
160 |
161 | ```
162 |
163 |
164 |
165 |
166 |
167 | x
168 | y
169 |
170 |
171 |
172 |
173 |
174 |
175 | points_ptr
176 | points_size
177 |
178 |
179 |
180 |
181 |
182 |
183 | outer
184 |
185 |
186 |
187 | inners
188 |
189 |
190 |
191 |
192 |
193 | ```
194 |
195 | Current limitations:
196 |
197 | * only one entry per type
198 | * in C# elements stored in containers has to be ValueTypes, Points and Boxes has to be structs
199 |
200 | See more [examples at GitHub](https://github.com/awulkiew/graphical-debugging/tree/master/examples).
201 |
202 | #### Direct memory access
203 |
204 | The extension attempts to obtain data through direct memory access if possible. From this feature benefit all supported containers of fundamental numeric types and geometries using such coordinate types. E.g.:
205 | * `int arr[5]`
206 | * `std::array`
207 | * `std::vector`
208 | * `std::deque >`
209 | * `std::list >`
210 | * `boost::container::vector`
211 | * `boost::geometry::model::linestring< boost::geometry::model::point >`
212 | * `boost::polygon::polygon_data`
213 | * `double[]` (C#)
214 | * etc.
215 |
216 | This behavior is enabled by default but can be disabled in options under **Tools**->**Options**->**Graphical Debugging**->**General**
217 |
218 | #### Zooming/cropping
219 |
220 | Geometry Watch and Plot Watch has zooming/cropping feature. Mouse wheel can be used to zoom in/out as well.
221 |
222 | 
223 |
224 | 
225 |
226 | #### Options
227 |
228 | Options for each Watch can be found under **Tools**->**Options**->**Graphical Debugging**
229 |
230 | 
231 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/release_notes.txt:
--------------------------------------------------------------------------------
1 | version 0.56
2 |
3 | bugfixes:
4 | - fixed loading of C# variables in VS22 17.11+ (thanks to Vojtech Musilek)
5 |
6 | version 0.55
7 |
8 | additions:
9 | - add handling of C++ types decorated with module name
10 | bugfixes:
11 | - fixed cancelling of loading taking too much time
12 | - fixed loading of user-defined point-based boxes, segments and rays
13 |
14 | version 0.54
15 |
16 | bugfixes:
17 | - fixed drawing of small circles
18 | - variables are no longer loaded after closing watch window
19 |
20 | additions:
21 | - direct memory access for Boost.Geometry nsphere
22 | - support for C++ rvalue references
23 | - support for types defined in DLLs
24 | - support for std::chrono::duration
25 |
26 | version 0.53
27 |
28 | bugfixes:
29 | - fixed handling of debugger context change, e.g. on call stack
30 | - fixed selection and text edit colors
31 | - fixed visualization of very small geographic areas
32 |
33 | additions:
34 | - expression error in Type column
35 | - context menus for row of list of variables
36 | - support for ctrl+v for row of list of variables
37 |
38 | version 0.52
39 |
40 | bugfixes:
41 | - fixed visualization when user-defined point was defined incorrectly
42 | - fixed visualization of collections with empty elements
43 | - fixed normalization of angles
44 |
45 | version 0.51
46 |
47 | additions:
48 | - handling of C++ const, volatile and reference variables
49 |
50 | version 0.50
51 |
52 | additions:
53 | - support for Visual Studio 2022
54 |
55 | breaking changes:
56 | - dropped support for Visual Studio 2013, 2015, 2017 and 2019
57 |
58 | version 0.34
59 |
60 | bugfixes:
61 | - fixed validity checks of user-defined types
62 | - fixed visualization of some types with VS2019, e.g. Boost.Geometry segment and rtree
63 |
64 | version 0.33
65 |
66 | additions:
67 | - support for user-defined Segment, Ray and Line
68 | - support for Visual Basic array and List and basic data types (without direct memory access)
69 | - loading time message window no longer blocks loading
70 | - containers of geometries use color of the elements in GraphicalWatch
71 |
72 | version 0.32
73 |
74 | additions:
75 | - support for Type pattern in user-defined classes
76 | - support for user-defined coordinate systems and units
77 | - support for base classes of known types in C#, e.g. IList<>
78 | - support for user-defined Boxes
79 | - added enabling/disabling of geometries and plots
80 | - added changing of colors of geometries and plots
81 | - improvement of list editing, single click edit
82 | - implemented direct memory loading of Boost.Geometry R-tree
83 | - implemented direct memory loading of containers of geometries
84 | - various other loading optimizations
85 |
86 | version 0.31
87 |
88 | bugfixes:
89 | - fixed issue with user-defined containers element type expected to be the first template argument
90 | - fixed issue with user-defined containers not updated after change in XML file
91 |
92 | version 0.30
93 |
94 | additions:
95 | - support for user-defined Container based on Array or LinkedList
96 | - support for user-defined MultiGeometry
97 | - support for C# LinkedList<>
98 | - support for containers of geometries
99 |
100 | version 0.29
101 |
102 | additions:
103 | - support for user-defined Linestring, Ring, Polygon, MultiPoint, MultiLinestring and MultiPolygon
104 |
105 | bugfixes:
106 | - fixed infinite loops for huge non-cartesian coordinates
107 |
108 | version 0.28
109 |
110 | additions:
111 | - multiple instances of *Watch windows can be opened (up to 10)
112 | - try to load as many variables as possible even if exceptions are thrown during loading of some of them
113 | - improved scales for big coordinates
114 |
115 | bugfixes:
116 | - fixed exception for empty geometries
117 | - fixed exception for big coordinates
118 |
119 | version 0.27
120 |
121 | additions:
122 | - support for std::set
123 | - support for boost::circular_buffer
124 | - support for boost::gil::image
125 | - support for boost::geometry::index::rtree (no direct memory access for now, so it may take long time to load)
126 | - variable loading time check and possibility to stop if it takes too long
127 |
128 | bugfixes:
129 | - updated debugger visualizers for boost::variant
130 |
131 | version 0.26
132 |
133 | additions:
134 | - improvement of general options
135 |
136 | version 0.25
137 |
138 | additions:
139 | - support C# arrays and List<> of points
140 | - basic support for user-defined point types
141 |
142 | bugfixes:
143 | - fixed issue with Hexadecimal Display enabled
144 |
145 | version 0.24
146 |
147 | additions:
148 | - direct memory access for C# List<>
149 |
150 | version 0.23
151 |
152 | additions:
153 | - zoom in/out with mouse wheel
154 | - support C# arrays (with direct memory access) and List<> (without direct memory access)
155 |
156 | version 0.22
157 |
158 | additions:
159 | - visualization of containers of coordinates
160 |
161 | version 0.21
162 |
163 | additions:
164 | - support for Visual Studio 2019
165 |
166 | version 0.20
167 |
168 | additions:
169 | - support for Visual Studio 2013
170 |
171 | bugfixes:
172 | - fixed Graphical Watch variables list unresponding after removing elements
173 |
174 | version 0.19
175 |
176 | additions:
177 | - segments of non-cartesian geometries are now densified and drawn as curves in order to reflect the curvature of the globe
178 |
179 | bugfixes:
180 | - various fixes for non-cartesian geometries, incl. handling of geometries going around the globe and segments going through poles
181 |
182 | version 0.18
183 |
184 | additions:
185 | - visualization of c-arrays of values or points
186 | - visualization of pointers to elements with "size specifier" feature
187 |
188 | bugfixes:
189 | - fixed exception while debugging Boost.Variant holding non-supported type
190 |
191 | version 0.17
192 |
193 | additions:
194 | - asynchronous loading of the extension
195 | - improved debugging speed of std::deque by direct memory access
196 | - improved debugging speed of std::list by direct memory access
197 | - variables of type std::complex<...> can be displayed as Points in complex coordinate system
198 |
199 | bugfixes:
200 | - fixed/improved navigation in watches' lists of variables
201 | - better handling of empty geometries
202 |
203 | version 0.16
204 |
205 | additions:
206 | - variables of type std::pair<...> are treated as Points
207 | - containers of Points (e.g. std::vector>) are treated as MultiPoints
208 | - Plot Watch now displays MultiPoints / containers of points as Point Plot
209 | - new options for Plot Watch (Point Plot types)
210 | - new options for Graphical Watch (image size, Point Plot types, etc.)
211 | - variables are not reloaded if only redraw is required (e.g. while zooming or view reset)
212 | - various drawing tweaks
213 |
214 | bugfixes:
215 | - fix for variable list items removal causing the list to be nonresponding
216 |
217 | version 0.15
218 |
219 | additions:
220 | - faster debugging by direct memory access (can be disabled in options)
221 |
222 | bugfixes:
223 | - scaling of the coordinate system for points and other 0-size data
224 |
225 | version 0.14
226 |
227 | additions:
228 | - options for Geometry Watch and Graphical Watch
229 | - Plot Watch allows to combine plot types
230 | - context menu for images in Graphical Watch
231 |
232 | bugfixes:
233 | - fixed transparency of lines for line plot
234 |
235 | version 0.13
236 |
237 | additions:
238 | - three plot types for Plot Watch settable in Tools->Options
239 |
240 | version 0.12
241 |
242 | additions:
243 | - PlotWatch tool drawing containers of 1d values as bar charts.
244 | - drawing of axes in Graphical Watch
245 |
246 | bugfixes:
247 | - fixed displaying 0 value on scales
248 | - not all values stored in a container were drawn in GraphicalView
249 |
250 | version 0.11
251 |
252 | additions:
253 | - support for new version of boost::container::static_vector
254 | - zooming/cropping by mouse area selection in GeometryWatch (reset in context menu)
255 | - improved readability in GeometryWatch by adding XY scales, mouse cross lines and showing coordinates under cursor
256 |
257 | bugfixes:
258 | - prevent list row deletion if cell is being edited
259 |
260 | version 0.10
261 |
262 | additions:
263 | - add support for Visual Studio 2017
264 |
265 | version 0.9
266 |
267 | additions:
268 | - support drawing of Boost.Geometry buffer_turn_info, buffered_ring, buffered_ring_collection
269 |
270 | bugfixes:
271 | - fixed colors of geometries when many are on the list
272 |
273 | version 0.8
274 |
275 | additions:
276 | - add more Boost.Geometry types to natvis
277 |
278 | bugfixes:
279 | - fixed drawing of geometries containing very short segments
280 |
281 | version 0.7.1
282 |
283 | bugfixes:
284 | - fixed exception while drawing very small non-cartesian geometries
285 |
286 | version 0.7
287 |
288 | bugfixes:
289 | - fixed drawing of special cases of Boxes in spherical equatorial and geographic coordinate systems
290 | - fixed drawing of one-dimensional value containers
291 |
292 | version 0.6.5
293 |
294 | additions:
295 | - use round joins of drawn segments to avoid visual spikes
296 |
297 | bugfixes:
298 | - exception thrown while drawing of empty multi-geometry in GeometryWatch
299 |
300 | version 0.6.4
301 |
302 | additions:
303 | - support for Boost.Geometry NSphere
304 |
305 | bugfixes:
306 | - periodic Points and Boxes wasn't drew with dotted pen
307 |
308 | version 0.6.3
309 |
310 | additions:
311 | - simple context menu for GeometryWatch image (copy to clipboard)
312 |
313 | bugfixes:
314 | - removal of min height property sometimes causing problems for GeometryWatch controls
315 |
316 | version 0.6.2
317 |
318 | additions:
319 | - tooltip for variable type
320 | - wrapped type string in GraphicalWatch
321 |
322 | bugfixes:
323 | - fixed drawing of Boost.Polygon rectangle_data
324 |
325 | version 0.6.1
326 |
327 | additions:
328 | - Geometry, MPL and Tuple vizualizers
329 |
330 | version 0.6
331 |
332 | additions:
333 | - Visual Studio themes support
334 | - visualization colors depending on currently used theme
335 | - ListViews replaced with DataGrids
336 |
337 | version 0.5.1
338 |
339 | bugfixes:
340 | - improved icon and description
341 |
342 | version 0.5
343 |
344 | additions:
345 | - implement handling of various coordinate systems
346 | - support spherical_equatorial and geographic coordinate systems
347 | - in GeometryWatch draw axes/meridians/parallels, info about the coordinate system, units and error messages
348 |
349 | version 0.4
350 |
351 | additions:
352 | - support more STL containers
353 | - support Boost.Polygon models
354 | - support Boost.Container vector and static_vector
355 | - icons!
356 |
357 | bugfixes:
358 | - GeometryWatch wasn't redrawn if empty geometries were left after removal. Caused by an attempt of drawing of an invalid/inverted AABB.
359 | - Transparent color was added into the colors pool after removal of undrawable variable from the GeometryWatch list.
360 |
361 | version 0.3
362 |
363 | additions:
364 | - drawing segments direction in GeometryWatch
365 | - supported all Boost.Variant parameters
366 | - display Turns methods and operations
367 | - avoid displaying labels of the same Turn point in the same place
368 |
369 | bugfixes:
370 | - fix drawing of Polygon inner rings in GeometryWatch
371 | - redraw GeometryWatch image after removal of list elements
372 |
373 | version 0.2
374 |
375 | additions:
376 | - debug visualizers for boost::geometry::debug::overlay::turn_info and boost::geometry::debug::overlay::traversal_turn_info
377 | - displaying Turns Containers in GraphicalWatch and GeometryWatch
378 |
379 | bugfixes:
380 | - removed invalid comments at the beginning of natvis files
381 | - reusing color in GeometryWatch until a geometry is removed from the list
382 | - fix std::deque support in GraphicalWatch
383 | - support const types
384 |
385 | version 0.1
386 |
387 | additions:
388 | - debug visualizers for Boost.Array, Boost.Geometry, Boost.Variant
389 | - GraphicalWatch
390 | - GeometryWatch
391 |
--------------------------------------------------------------------------------
/solution/GraphicalDebugging/PlotWatchControl.xaml:
--------------------------------------------------------------------------------
1 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
40 |
41 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
75 |
76 |
77 |
80 |
81 |
82 |
86 |
87 |
88 |
112 |
113 |
114 |
115 |
116 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
149 |
150 |
151 |
152 |
153 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
--------------------------------------------------------------------------------