I'm writing an extension for VSCode. I would like to get the runtime version of the extension from its own code. Is there a way to do that?
I found VSCode.extensions.getExtension('myExtensionId').packageJSON
but I don't know what to do with that.
Bring up the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VS Code or the View: Extensions command (Ctrl+Shift+X). This will show you a list of the most popular VS Code extensions on the VS Code Marketplace.
IntelliSense is a general term for various code editing features including: code completion, parameter info, quick info, and member lists. IntelliSense features are sometimes called by other names such as "code completion", "content assist", and "code hinting."
I was finally close. Using:
VSCode.extensions.getExtension('publisher.myExtensionId').packageJSON.version
seems to do the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With