Image Watch is now available for Visual Studio 2017

Marian Luparu

点这里看中文版

Image Watch is a Visual Studio extension that provides a watch window for viewing in-memory bitmaps when debugging native C++ code. It comes with built-in support for OpenCV image types (e.g. cv::Mat, cv::Mat_<> , etc.).

We know that, for many of you, this is an important part of your C++ debugging experience. We have received many requests to support this extension on Visual Studio 2017 via survey responses, blog comments and Reddit conversations.

We’re happy to announce that Image Watch for Visual Studio 2017 is now available for download in Visual Studio Marketplace.

Getting started with OpenCV and Image Watch

You can try Image Watch with any OpenCV program. You will need the OpenCV library installed on your developer machine to be able to compile these programs. You can run the following vcpkg commands to download and compile OpenCV on your machine:

1. Install vcpkg (Skip if you already have a working vcpkg installation):

git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
vcpkg integrate install

2. Install OpenCV

vcpkg install opencv

If you are looking for a place to start with OpenCV, you can use the example provided in the Image Watch tutorial on opencv.org. Create a new C++ project from File > New > Project… > Visual C++ > Windows Desktop, by selecting the Windows Console Application template. Then, replace the content of the main C++ file with the opencv.org example linked above.

During any C++ debugging session, you can bring up the Image Watch window by selecting:

  • View > Other Windows > Image Watch menu or
  • Auto, Watch or Locals window > 🔍 next to any supported variable > Add to Image Watch context menu, or
  • Hover over any variable to display its Data Tip > 🔍 next to the value > Add to Image Watch context menu

To learn more about the various ways you can use Image Watch, check out the Image Watch Help page.

Discover more Visual Studio extensions

We hope you enjoy using Image Watch for Visual Studio 2017. As always, we’re looking forward to your feedback and suggestions.

If you want to explore other useful Visual Studio extensions for C++ development in the Visual Studio Marketplace, check out our article “Visual Studio extensions for C++ developers in Visual Studio 2017”.

0 comments

Discussion is closed.

Feedback usabilla icon