Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CV DebugMate C++New to Visual Studio Code? Get it now.
CV DebugMate C++

CV DebugMate C++

zwdai

|
3 installs
| (0) | Free
Visualize OpenCV Mat and Point Cloud during C++ debugging. Inspired by Image Watch.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CV DebugMate C++

English | 中文

A Visual Studio Code extension for visualizing OpenCV data structures during C++ debugging.

Inspired by Image Watch for Visual Studio.


Features

🖼️ Mat Visualization

  • View cv::Mat images directly in VS Code during debugging
  • Support for grayscale, RGB, and multi-channel images
  • Support for various data types: CV_8U, CV_32F, CV_64F, etc.
  • Zoom in/out with mouse wheel
  • Pan by dragging
  • Pixel value display on hover
  • Grid overlay when zoomed in

📊 Point Cloud Visualization

  • View std::vector<cv::Point3f> as 3D point clouds
  • Interactive 3D rotation with mouse
  • Powered by Three.js

💾 Export Options

  • Save PNG: Export image as PNG file
  • Save TIFF: Export image as TIFF file (supports floating-point data)

Screenshots

Mat Visualization

Mat Visualization

Point Cloud Visualization

Point Cloud Visualization


Supported Debuggers

Debugger cv::Mat Point Cloud Notes
cppvsdbg (Visual Studio Debugger) ✅ Tested ✅ Tested Full support on Windows
cppdbg (GDB/LLDB via cpptools) ❓ Untested ❓ Untested Should work, not tested
lldb (CodeLLDB + MSVC) ✅ Tested ❌ Not working LLDB cannot parse MSVC STL, vector size always returns 0
lldb (CodeLLDB + GCC/Clang) ❓ Untested ❓ Untested May work with libstdc++/libc++, not tested

Known Limitations

  • CodeLLDB + MSVC: When using CodeLLDB to debug MSVC-compiled code, point cloud visualization does not work because LLDB cannot correctly parse MSVC's STL implementation (std::vector size always returns 0). However, cv::Mat visualization works correctly.

  • CodeLLDB + GCC/Clang: If you compile with GCC or Clang (using libstdc++ or libc++), point cloud visualization may work, but this has not been tested.

  • cppvsdbg license: If you are using closed-source VS Code forks like Cursor, Qoder, or similar IDEs, you may need to use CodeLLDB for debugging MSVC-compiled code, as cppvsdbg may not be available in these environments. Note that point cloud visualization will not work in this case due to LLDB's limited support for MSVC STL.


Usage

  1. Start a C++ debug session in VS Code
  2. Set a breakpoint where OpenCV variables are in scope
  3. In the Variables or Watch panel, right-click on a supported variable (cv::Mat or std::vector<cv::Point3f>)
  4. Select "View by CV DebugMate" from the context menu
  5. The visualization will open in a new tab

Debug Usage


Supported Types

cv::Mat

  • Grayscale images (1 channel)
  • Color images (3 channels, BGR)
  • RGBA images (4 channels)
  • Depth types: CV_8U, CV_8S, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F

Point Clouds

  • std::vector<cv::Point3f>
  • std::vector<cv::Point3d>

Keyboard & Mouse Controls

Image Viewer

Action Control
Zoom In Scroll Up / Click "Zoom In"
Zoom Out Scroll Down / Click "Zoom Out"
Pan Click and Drag
Reset View Click "Reset"
Save PNG Click "Save PNG"
Save TIFF Click "Save TIFF"

3D Point Cloud Viewer

Action Control
Rotate Click and Drag
Zoom Scroll

Installation

From VSIX

  1. Download the .vsix file
  2. In VS Code, go to Extensions view (Ctrl+Shift+X)
  3. Click ... menu → "Install from VSIX..."
  4. Select the downloaded file

From Source

git clone <repository-url>
cd cv-visualizer
npm install
npm run compile
# Press F5 to run in Extension Development Host

Requirements

  • VS Code 1.93.0 or higher
  • A C++ debugger extension:
    • C/C++ Extension (for cppdbg/cppvsdbg)
    • CodeLLDB (for lldb)

Acknowledgments

This extension is inspired by Image Watch, a popular Visual Studio extension for viewing images during debugging. CV DebugMate C++ brings similar functionality to Visual Studio Code, making it available for cross-platform C++ development.


License

MIT


Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft