Image Comments Visual Studio Code extension lets you easily add visual comments such as sketches or diagrams directly into your source code, improving code documentation and understanding.
- Hover over comments to display your custom images in a tooltip
- Easy-to-use comment syntax for linking images
- Visual Studio Code version 1.60.0 or higher
- Open Visual Studio Code
- Go to Extensions Marketplace
- Search for "Image Comments"
- Click the "Install" button
Or just install the extension from marketplace.
Write your comment in the following format:
// Describes the function logic [image-comments/image1.png]
- Place your image in the project folder and note its file path relative to the project root.
- Insert a standard comment into your code.
- Append the relative image path to the comment, enclosed in square brackets.
- Hover over the comment to view the image directly within your code editor.