Can we add image in code comments in VS code

60 views Asked by At

Is it possible to add an image in code comments in VS code? I am working on an angular project. Adding meaningful comments is an important step in the project. Explaining a login in comments in natural language is not effective, however adding an image would help a lot. Is there a way we can add an Image is code comments either directly or thru 3rd party extensions. Please look at the image below. I want the actual image to be visible in the comments rather than a link or a path.

standard png screen shot

1

There are 1 answers

2
Krzysztof On

There is an extension for this: https://marketplace.visualstudio.com/items?itemName=mgiesen.image-comments

Usage:

// Describes the function logic [image-comments/image1.png]

The only way to display an image is to hover over the comment, as it is not possible to place images directly in the code, since it is implemented as a textarea.