Skip to content

dull-bird/cv_debug_mate_cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

167 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CV DebugMate C++

VS Code Version OpenCV License C++11 Demo Build

English | ไธญๆ–‡

A Visual Studio Code extension for visualizing 1/2/3D data structures during C++ debugging.

Inspired by Image Watch for Visual Studio.


๐Ÿš€ Try It Now!

๐Ÿ“‚ Example Project: test_cpp/

Complete demo with ALL supported types! Build and debug to see CV DebugMate in action.

# macOS / Linux
cd test_cpp && ./build.sh && code .

# Windows PowerShell
cd test_cpp; .\build.ps1; code .

โšก Supported Types (Quick Reference)

Category Type Visualization
Image (2D) cv::Mat, cv::Mat_<T> ๐Ÿ–ผ๏ธ Image Viewer
cv::Mat_<cv::Vec3b>, cv::Mat_<cv::Vec3f> ๐Ÿ–ผ๏ธ Image Viewer
cv::Matx (Matx33f, Matx44d, etc.) ๐Ÿ–ผ๏ธ Image Viewer
std::array<std::array<T, cols>, rows> ๐Ÿ–ผ๏ธ Image Viewer
T[rows][cols] (C-style 2D array) ๐Ÿ–ผ๏ธ Image Viewer
T[H][W][C] (C-style 3D array, C=1,3,4) ๐Ÿ–ผ๏ธ Image Viewer
std::array<std::array<std::array<T, C>, W>, H> ๐Ÿ–ผ๏ธ Image Viewer
Point Cloud (3D) std::vector<cv::Point3f> ๐Ÿ“Š 3D Viewer
std::vector<cv::Point3d> ๐Ÿ“Š 3D Viewer
std::array<cv::Point3f, N> ๐Ÿ“Š 3D Viewer
std::array<cv::Point3d, N> ๐Ÿ“Š 3D Viewer
Plot (1D) std::vector<T> (numeric) ๐Ÿ“ˆ Plot Viewer
std::array<T, N> (numeric) ๐Ÿ“ˆ Plot Viewer
T[N] (C-style 1D array, numeric) ๐Ÿ“ˆ Plot Viewer
std::set<T> (numeric) ๐Ÿ“ˆ Plot Viewer
cv::Mat (1ร—N or Nร—1, single channel) ๐Ÿ“ˆ Plot Viewer
Pointer Types cv::Mat*, cv::Matx* Same as pointee
std::vector<T>*, std::array<T,N>* Same as pointee

Numeric types: int, float, double, uchar, short, long, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, etc.

Image depth: CV_8U, CV_8S, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F

Pointer support: Pointers to supported types (e.g., cv::Mat*, std::vector<float>*) are automatically dereferenced. A pointer and its pointee pointing to the same memory address will share the same visualization tab.


๐ŸŽฏ Features

Feature Description
๐Ÿ“ˆ 1D Plot Line/Scatter/Histogram, custom X-axis, zoom, pan, export PNG/CSV
๐Ÿ–ผ๏ธ 2D Image Multi-channel, auto-normalize, colormap, zoom up to 100ร—, pixel values on hover
๐Ÿ“Š 3D Point Cloud Three.js powered, color by X/Y/Z, adjustable point size, export PLY
๐Ÿ”— View Sync Pair variables for synchronized zoom/pan/rotation across viewers
๐Ÿ” Auto Detection Variables panel auto-detects all visualizable types in current scope
๐Ÿ”„ Auto Refresh Webview auto-updates when stepping through code

๐Ÿ”ง Debugger Support

Compiler Extension 1D Data cv::Mat Point Cloud Notes
MSVC C/C++ (cppvsdbg) โœ… โœ… โœ… Windows
GCC C/C++ (cppdbg) โœ… โœ… โœ… Windows MinGW
Clang+MSVC CodeLLDB โš ๏ธ โœ… โŒ LLDB can't parse MSVC STL
Clang CodeLLDB โœ… โœ… โœ… macOS

๐Ÿ“– Usage

Option 1: CV DebugMate Panel (Recommended)

  1. Start a C++ debug session
  2. Open "Run and Debug" sidebar
  3. Find CV DebugMate section
  4. Click variable name to view

Option 2: Context Menu

Right-click a variable โ†’ "View by CV DebugMate"


๐Ÿ“ท Screenshots

1D Plot

1D Curve Plotting

2D Image

Mat Visualization

3D Point Cloud

Point Cloud Visualization

Variables Panel

CV DebugMate Panel


๐ŸŽฎ Controls

Image Viewer

Action Control
Zoom Scroll wheel
Pan Drag
Reset Click "Reset"
Export Save PNG / TIFF

3D Point Cloud Viewer

Action Control
Rotate Drag
Zoom Scroll wheel
Color Switch by X/Y/Z axis
Export Save PLY

Plot Viewer

Action Control
Zoom Rectangle select or scroll
Pan Drag
Mode Line / Scatter / Histogram
Export Save PNG / CSV

๐Ÿ“ฆ Installation

From VSIX

  1. Download .vsix file
  2. Extensions view (Ctrl+Shift+X) โ†’ ... โ†’ "Install from VSIX..."

From Source

git clone https://github.com/dull-bird/cv_debug_mate_cpp
cd cv_debug_mate_cpp
npm install
npm run compile
# Press F5 to run

๐Ÿ“‹ Requirements


๐Ÿ™ Acknowledgments

Inspired by Image Watch for Visual Studio.


๐Ÿ“„ License

MIT


๐Ÿค Contributing

Issues and PRs welcome!

About

CV DebugMate C++: A Visual Studio Code extension for visualizing 1/2/3D data structures during C++ debugging.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors