In Visual Studio for my native C++ program I want to get a plot of some variables during debug. Mostly I use textual representation of the objects by editing autoexp.dat. But for some of the variables it is better to have a plot rather than having values in textual form.
So far I have used a function plot(const void* address,const char* type)
, and called it from Immediate Window giving the variable address & the type, and internally casting it to proper type.
But this method has two disadvantage.
- First is that, function overloading almost never works when calling a function from debugger (so I had to pass type as a second parameter), and the function call occasionally crashes, though it works perfectly when called from within code.
- Second is, instead of writing a C++ function for plotting, I am interested to have a scripting language (like autoexp.dat or a VBScript) to give the internal data of the C++ object without writing any wrapper, so that I can use the script to store the data in a file or plot it.
In general I am interested to have something like Matlab or Ch IDE, where I can plot certain variable externally when the program is at a debug break.