Download
ArrayPlotter is a debugger visualisation tool that allows you to dynamically plot the contents of your C++/C# arrays and IEnumerables within the Visual Studio debugger.
Features:
- Plot C++ or C# array or IEnumerable contents into a zoomable chart. Supported datatypes:
- float
- double
- unsigned/signed int
- unsigned/signed short
- unsigned/signed char
- Handles complex number of above datatypes (can plot real / imaginary / magnitude)
- Auto Update feature will automatically plot array upon entering break mode
- ArrayPlotter window is a standard dockable/moveable Visual Studio window
- Chart supports auto or manual y-scaling
- Both array pointer and length expressions are supported, ie length can be a fixed integer or a variable with a constantly changing value. Pointer and numerical arithmetic can also be applied
ArrayPlotter 0.1 |
How to Use:
- Set your breakpoint at desired location
- Run your application and enter the breakpoint
- Open the window from Debug->Windows->ArrayPlotter
- Dock/move/resize the window to where you want it (Visual Studio will remember the location preferences like any other window)
- In the Pointer Expression box enter the array pointer:
- For C++ this is simply the pointer variable name
- For C# you will have to enter the address of the first element, ie &cSharpArray[0]
- For C# IEnumerable types you must include .ToArray() in the pointer expression, ie &floatEnumerable.ToArray()[0]
- For both you can perform pointer arithmetic, ie &cSharpArray[0]+20 means start at the 20th element
- In the Length Expression box enter the length of the array as either:
- An Integer, ie 1024
- An expression, ie arrayLength, DATA_LENGTH, or even dataStruct.NumSamples
- For IEnumerable types you can include .Count() method, ie floatEnumberable.Count()
- Also, numerical arithmetic can be performed, ie dataStruct.NumSamples/2 will plot half of the array
- From the Format drop down select the data type
- From the Structure drop down select the data type. This will typically be Scalar UNLESS you are using array of Complex values which are defined to be pairs of the same data type laid out in memory as <real1,imag1,real2,imag2,real3,imag3,...>. In this case you can select if you want to plot the Real, Imaginary or Amplitude components
- Click Plot
- To zoom in on the chart press and hold left-mouse and select the desired zoom region and release. Double click to reset zoom. Alternatively the mousewheel can be used to zoom in/out on cursor location (Mousewheel VS2012+ only)
- If Auto Update is enabled, then any time debug mode is entered then the currently entered expression will be evaluated and re-plotted
No comments:
Post a Comment