Visual Studio Developer Center >
Visual Studio Forums
>
Visual Studio Extensibility
>
Create add-in to access and display data within debugger
Create add-in to access and display data within debugger
- Can anyone help point me in the direction of some tutorial or similar that may describe something similar that would help me achieve my goal???
I want to create an add-in that will allow me to display and even possibly modify data within the debugger (c/c++). I have a data structure (from c originally) that describes a matrix: pointer to data, number of rows, number of columns, etc. I would like to be able to create a visualisation of this data such that it would show a 2-D matrix's data in a 2-D form. This is an alternative to having to view it thriugh the watch window by typing, for example:
myMatrix.data[23] (particularly where a single dimmension is used to pick out a 2-D element position)
I would hope to see something like the expandible view that you now get when you hover over a variable but when expanding the "data" member of the structure I would want to see something in 2-D form, e.g.
mYMatrix.data:
1.23456 3.456432 -12.345676
2.34567 13.26262 12.6778688
-123.37 123.3838 -1234.2828
etc.
This would be in some presentable GUI-style form. I have no idea how to go about doing this. I have just read the introduction about how to create an add-in to Developer Studio which I am able to follow but once it gets to the point where I need to be able to access the user-data from within the debugger I would not know where to start.
Can anyone help point me in the direction of some tutorial or similar that may describe something similar that would help me achieve my goal???
Thanks in advance
All Replies
- Hi beefburg,
What you are looking for is known is a Debugger Visualizer. You can learn more about this extensibility option here:
http://msdn.microsoft.com/en-us/library/zayyhzts.aspx
At the bottom of the page are links to How-to guides and Walkthroughs. If this won't work for your scenario, please let us know.
Thanks,
Nathan- Proposed As Answer byNathan Halstead [MSFT]ModeratorTuesday, November 03, 2009 8:45 AM
- Thanks for the reply. I have had a brief browse through and I can see that it is starting to address my needs. I note there is no c++ example ; do you know of any c++ examples that would help? Also, it seems to be talking about visualising classes. I have a simple data type that is described by a typedef struct. Would I be able to create a visualiser for simple data of this type, i.e. not a c++ class. typedef struct { double *fData; unsigned int *uiNumRows; unsigned int *uiNumCols; unsigned int *uiMaxRows; unsigned int *uiMaxCols; } tDoubleMatrix; Where the fData member is malloced during the creation of a matrix and its sizes are set-up. I want to be able to visualise this type of data and a similar integer version of the matrix. I assume I would retain all of the features of the standard debugger but would just add-in my extra feature? If you are able to confirm these basic requirements it would give me the confidence that it is worth investing a decent amount of time into pursuing this. I spend a large part of my working life debugging legacy software using this type of data as part of a bespoke matrix library implementation which has been used on a number of large software projects. I should add that it was me that wrote the library and the software that uses it so I have only myself to blame !! Thanks again for the help


