Image Watch

Microsoft Free

Provides a watch window for visualizing in-memory images (bitmaps) when debugging native C++ code.

(43) Review
Visual Studio
2015, 2013, 2012
Download (61,952)
E-mail Twitter Digg Facebook
Add to favorites
Reviews (43)
Q and A (96)
Sign in to write a review
Sort by:

by Luka Lukic | September 20 2015

by KayleXuan | September 13 2015

Never have I seen a more powerful tool than this one in img processing.

by FlorianG73 | August 25 2015

Exxxcellent tool ! Very helpfull for debuging.

Will get the fifth star when support for 1Bpp and CMYK images will be available.

by Goran Dubajic | August 06 2015

Great tool!
Bug: debugging from VS2015 with platform toolset VS2013 in Image Watch it states [invalid] for an image which is correctly displayed when debugging from VS2013. If platform toolset is VS2015 everything works OK.

by olvrw | July 22 2015

by StevenHickson | July 17 2015

I really can't say enough about this plugin. It makes debugging for computer vision much easier and faster.
The visualization of custom classes is easy and also a great addition.

by zzdrghost | May 05 2015


by SergBabiychuk | April 16 2015

Great tools!
But I would like to see support:
1) for Qt5 objects: QImage,QPixmap(QBitmap)
2) for any pointers, with user selection of image parameters while debugging

by Baris Demiroz | March 24 2015

by Eejdoowad | March 13 2015

by Jaka Konda | March 03 2015

by vuki | February 27 2015

A must if you program with OpenCV

by bambambigelow | January 28 2015

this is an amazing extension! works like a charm and saves a lot of hassle while debugging opencv code

by Y.T. Tommy HU | January 08 2015

by Lukas Neumann1 | December 19 2014

Works like a charm, this add-in is a must for everyone working with OpenCV in Visual Studio.

by Elador | December 16 2014

THE best and most amazing plugin ever! Makes coding so much more productive, and more fun as well.

If you want one suggestion on what to improve, I'd say @mem(...). I don't needed it often, but when I'd need it, I most of the time can't get it to work. It's kind of documented, but I'm never sure: Do I put in the name of the variable? or '&variable'? or the address? or the address with 0x...? or...? and more often than not it's not working, and also not printing any error/debug information.

I think what would be useful as well is a small button that opens a menu that shows all the operators you can use, and their syntax - like a small documentation inside.

But those are just some tiny suggestions. It is incredible as it is!

by Mor CH | November 09 2014

absolutely useful and great, but I want this add-on for both Xcode and eclipse (Mac and Linux) very bad please.

by John Dance | September 12 2014

This makes debugging image handling so much easier. I love it! Thank you! The ability to extend to my image types (QImage/QPixmap) is a game changer.

by Rob42_ | August 04 2014

Thanks for this great extension to Visual Studio,
would like to see this open sourced to add even more features.

by Mudit Agrawal | June 24 2014

This is indeed a game changer! Debugging in-memory images has always been so hard in VS. The simple power of Image-Watch visualization, combined with the efficient operators can turn hours of debugging to minutes or seconds.

Great work!

1 - 20 of 43 Items   
Sign in to start a discussion

  • Invalid Images
    2 Posts | Last post Sun 4:37 PM
    • I'm attempting to get a template image class to be displayed, but all I get are invalid images.  I'm able to draw the images to the screen, output them to a file, etc, so I'm pretty sure all the data is correct.  My natvis file gets loaded correctly by the debugger (I can see all the various data fields, and they all have correct values).  Here's a simplified version of my class and the natvis file:
      namespace tltImaging
      template <typename T>
      class cImage:public cImageBase
           int mNumChannels;
           int mWidth;
           int mHeight;
           T*  mData;
      <AutoVisualizer xmlns="">
        <UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" MenuName="Add to Image Watch"/>
        <Type Name="tltImaging::cImage&lt;*&gt;">
          <UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
        <Type Name="tltImaging::cImage&lt;*&gt;">
            <Synthetic Name="[type]" Condition='strcmp("unsigned char", "$T1") == 0'>
            <Item Name="[channels]">mNumChannels</Item>
            <Item Name="[width]">mWidth</Item>
            <Item Name="[height]">mHeight</Item>
            <Item Name="[data]">mData</Item>
            <Item Name="[stride]">mWidth*mNumChannels*sizeof($T1)</Item>
    • Hi, I met the same problem, but finally I found out that the Image Watch works only if you put the .natvis under this directory "C:\Users\***\Documents\Visual Studio 2015\Visualizers", as is instructed in the help page. 
      Otherwise even though the Visual Studio shows the debug information, Image Watch won't recognize it. 
      Wish you good luck :)
  • Does not work in VS2015 Update 2 with my type
    3 Posts | Last post April 26, 2016
    • Hello.
      Bellow the minimum reproducible code:
      #include "stdafx.h"
      #include <windows.h>
      class TestImage {
      	virtual ~TestImage() {
      		delete[] pData;
      	BYTE* pData;
      	BITMAPINFO m_Bmi;
      class TestImage8bit : public TestImage {
      	TestImage8bit(int Rows, int Cols) {
      		m_Bmi.bmiHeader.biWidth = Cols;
      		m_Bmi.bmiHeader.biHeight = Rows;
      		m_Bmi.bmiHeader.biBitCount = 8;
      		m_Bmi.bmiHeader.biXPelsPerMeter = (int)(1000.0F / 0.1f + 0.5F);
      		m_Bmi.bmiHeader.biYPelsPerMeter = (int)(1000.0F / 0.1f + 0.5F);
      		m_Bmi.bmiHeader.biPlanes = 1;
      		m_Bmi.bmiHeader.biSize = 40;
      		m_Bmi.bmiHeader.biSizeImage = Cols*Rows;
      		m_Bmi.bmiHeader.biClrUsed = 256;
      		pData = new BYTE[Cols*Rows];
      		memset(pData, 40, Cols*Rows);
      	~TestImage8bit() {}
      int main()
      TestImage* pIm = new TestImage8bit(50, 50);
          return 0;
    • Sorry, I clicked "Submit" before the time...
      bellow the natvis snippet:
        <Type Name="TestImage">
          <UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
         <Type Name="TestImage">
            <Synthetic Name="[type]">
            <Item Name="[channels]">m_Bmi.bmiHeader.biBitCount/8</Item>
            <Item Name="[width]">m_Bmi.bmiHeader.biWidth</Item>
            <Item Name="[height]">m_Bmi.bmiHeader.biHeight</Item>
            <Item Name="[data]">pData</Item>
            <Item Name="[stride]">m_Bmi.bmiHeader.biWidth*(m_Bmi.bmiHeader.biBitCount/8)</Item>
      It is working well in VS2013 and does not work in VS 2015
    • Hello. I've found some things about this issue.
      The problem happens with hierarchy of image classes, for example:
      class Image{};//The base class
      class Image8bit : public Image{}; 
      class Image24bit : public Image{};
      class Image32bit : public Image{};
      and we are manages pointer of type Image* to hold concrete images.
      If we declare in natvis only Image class, the visualizer shows "Invalid" for Image* pImage pointers. It worked well in VisualStudio 2013.
      My temporary workaround is to declare all derived image types in natvis, to add pointer Image* pImage to VS watch window, explicitly cast the pointer to concrete type (in the watch window), than to open the visualizer, and than visualizer shows the image.
  • make it open source
    2 Posts | Last post April 22, 2016
    • Seeing how more and more MS projects go open source this one should definitely be among them. Especially considering that it is neglected.
    • seconded
  • .bin file format?
    1 Posts | Last post March 24, 2016
    • This is my favorite tool, thank you for making it.
      Sometimes I need to dump images to analyze them further. For `double` valued single channeled images I want to dump them into a binary file. But I don't know how `.bin` files are formatted so I can't read them using a 3rd party tool. I couldn't find the format in the documentation. Do you have any idea how can I do this using Image Watch?
  • user type definition "invalid"
    1 Posts | Last post February 16, 2016
    • I ve already defined the user type simple image struct as given in the examples. but i coudln't visualize it, all the time it says "invalid"
      I just extend the ImageWatchOpenCV.natvis to visualize my image type. 
      i see the name of the image type, but invalid
      <!-- MTCE image MTCE_Img (simple struct to visualize MTCE image structs) -->
        <Type Name="MTCE_Img">
          <UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
        <Type Name="MTCE_Img">
            <Synthetic Name="[type]">
      	  <Synthetic Name="[channels]">
            <Item Name="[width]">nCols</Item>
            <Item Name="[height]">nRows</Item>
            <Item Name="[data]">imgData</Item>
            <Item Name="[stride]">nCols</Item>
  • exception has been thrown by the target of an invocation
    4 Posts | Last post January 29, 2016
    • when i start the Image Watch an error throwed "exception has  been thrown by the target of an invocation". 
      I have uncheced Managed C++ Compatibility Mode.
      My vs version is 2013, i have updated with update 1 package .
    • Which process is throwing the exception, your app or Visual Studio?
    • I am getting the same exception as well, thrown by Visual Studio. Every time I click on Image Watch from View > Other Windows, I get this exception.
      I have tried:
      - restarting the machine : doesn't solve the problem
      - uninstalling and reinstalling Image Watch : doesn't solve the problem
      - reducing the size of PATH (currently 1035 chars) based on some comments on the web : doesn't solve the problem
      At this point, I am not able to start/use Image Watch at all. Some help is greatly appreciated. :)
    • I found the solution was due to some missing Visual C++ redistributable .dlls. Please see my post on StackOverflow :
      I hope this helps.
  • Won't recognize .natvis files in projects
    2 Posts | Last post December 03, 2015
    • The plugin seems to be not reading projects' private nativs files. I have to put a .natvis to some global folder to make the image shown.
    • I am reproducing this issue. Natvis contained in project is new for Visual Studio 2015 I think. Visual Studio 2015 is able to recognize the Natvis files contained in the projects. Even though all special tags in the debugger are present for ImageWatch to parse properly ImageWatch is still telling that the image is [Invalid]. We can see in the ImageWatch.log file that the files contained in the projects are not parsed by ImageWatch.
      Please add support for this.
      Thank you.
  • Solution with and VC++ (CLR) proyect
    2 Posts | Last post November 09, 2015
    • I have a solution with two proyects.
      2º VC++(clr) Integrate with Opencv3.0
      Is possible debugging c++ code in proyect clr and use Image Watch in this case?
    • Sorry, this question (resolved by Wolf Kienzle- page 6)
      1) Attach a purely native debugger, not a mixed one. Note that "enabling native code debugging" in the C# project properties means "managed + native = mixed", not "native only". So you may have to attach to the running process via Debug->Attach, instead of the more convenient "Debug->Start Debugging"). 
      2) Turn off Tools->Options->Debugging->Managed C++ Compatibility Mode
      3) Put "#pragma unmanaged" guards before any of your OpenCV code. This will ensure that your OpenCV code is actually native, not managed.
  • C# port
    1 Posts | Last post November 01, 2015
    • Hi,
      your great extension is not available for C# debugging?
      Is there any way to use it?
      After install on VS 2015 I can view Image Watch window but there is no locals. 
      When I add any expression to watch list I can see only [invalid]
      Best Regards
  • raw bitmap
    6 Posts | Last post October 28, 2015
    • Hello.
      This extension has potential to be very useful to me. However, I don't have objects that represent pictures; I only have pointers to raw data (such as uchar *), paired with variables that hold width, height and stride.
      It would be great if you could add possibility to look images in a generic way - add another radio button which will show fields that could be manually edited (picture address, width, height, stride, format).
    • We will add support for this scenario in an upcoming update. Please see also the "Raw binary blob support" thread.
    • Is there any update on this? I just downloaded the latest version today and I have the same request. Thanks!
    • Hi! Update 1.0.1071.0 (April 2014) introduced the @mem operator to support this scenario. It is described on our help page under "Image Operators". Let us know if this isn't what you were looking for, or if you run into any problems with it. Thanks! -Wolf
    • Thanks for the operator support (and for the plugin in general, it is really important for my work). However despite the extensive documentation I do not understand where to write the operators down. Do they belong in the .natvis file and if yes, where? Could you add these information to the docs, maybe a sample natvis-file like there are several ones on the page?
    • You type it in the Image Watch window. Click the 'Watch' radio button, double click on a blank line, and type in (for example):
          mem(, UINT8, 1, 1600, 1200, 1600)
      to display a buffer of a grayscale unsigned char* of size 1600x1200.
1 - 10 of 96 Items