How to visualize the content of Graphics variable in Visual Studio 2010 during debug?
I am working on a rendering engine for my application and need to v开发者_StackOverflowisualize the Graphics object during the debug session. I looked at Image Visualizers for VS2010, like this or this, but they visualize only the Image objects, whereas I need the Graphics. What could be a solution here?
Regards, Alexander.
I finally figured it out on my own.
To enable the visualisation of Graphics
variables in VS2010 do the following:
- Download the Graphics Debugger Visualizer from this Code Project page (use the pre-compiled DLL version).
- Extract the DLL to the location where you have full rights.
- Right-click the DLL and press "Unblock" button on the first tab, in the right bottom corner. Click "Apply" and then "OK" to close the Properties Window.
Copy the DLL to the following location:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers
-or-
C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers
depending upon your system architecture.You don't have to restart VS2010, just run a debugging session and you'll see a small magnifying glass sign just to the left of the variable type name when you hover with you mouse cursor over your variable. Click this sign and you'll see the content of your Graphics object opened in a new window.
- Enjoy!
精彩评论