simply-view-image-for-python-opencv-debugging READMEFeaturesThis simple extension can and only can let you view the image of a variable when you are debugging python codes with opencv. Currently, It's only support python with opencv module (opencv-python) debugging. There is a limition that's your python codes must import opencv as cv2 and import numpy as np. For example:
RequirementsPython debugger extension for vscode (vscode Microsoft official python extension recommend) Python module of OpenCV support imwrite function installed (official module opencv-python recommend) How to useDue to vscode do not allow extension customizes hover when you are debugging so that this extension use the code action command to open a new editor to view the image. Since 0.0.5 add a command "View Image(Python OpenCV Debug)" and a keybord shortcut "ctrl+alt+q" to open the image. Step
Extension SettingsNo settings, the initail version is hardcode. LimitationsThe initail version is hardcode so there are some limitations:
Release Notes0.0.11Fix an issue, use the globalStorageUri.fsPath instead of globalStorageUri.path. 0.0.10Due to a change in the Python debugger type name from 'python' to 'debugpy' after a Visual Studio Code update, this extension became incompatible. This update addresses the issue, ensuring compatibility with the latest VSCode version 1.86.1. Thanks to aslampr07 (https://github.com/john-guo/simply-view-image-for-python-opencv-debugging/issues/24) 0.0.9Support TF2 tensor(Eager Execution must be enabled) or any other object that has a "numpy()" function which can convert it to a numpy array. Thanks to saeedizadi (https://github.com/john-guo/simply-view-image-for-python-opencv-debugging/issues/13) 0.0.8Now the global variables can be view, but still cannot know which thread or stack frame current within so that if many variables with the same name in different threads or different stack frames the result will be confused. 0.0.7Using a workaround for supporting multithreading. Thanks to zhfkt (https://github.com/john-guo/simply-view-image-for-python-opencv-debugging/issues/6) 0.0.6Add an option "svifpod.usetmppathtosave" to choose which path (tmp or extenion private storage path) to save, default is tmp path. 0.0.5Add a command "View Image(Python OpenCV Debug)". Add a keyboard shortcut "ctrl+alt+Q" for quickly image viewing. 0.0.4Add ndarray checking to avoid some exceptions. 0.0.3Update README.md 0.0.2Add support for float np array. Notice it's a hardcode workaround. Because of this fixing the python file must import numpy as np also. Thanks to marisancans (https://github.com/john-guo/simply-view-image-for-python-opencv-debugging/issues/1) 0.0.1Initial release Enjoy! |