How to get vscode help > about information

52 Views Asked by At

info

I am developing an extension using the vscode API. How do I get the help > about information in the top menu of vscode?

Not the entire text, but if I want to get the OS I want to get the string Windows_NT x64 10.0.19045

1

There are 1 best solutions below

0
On BEST ANSWER

For the OS entry in Help/About, you can use the os API available in Node.JS. Specifically the type(), arch() and release() functions.

Something like this will return the exact same content:

   const os = require("node:os");

   console.log(`OS: ${os.type()} ${os.arch()} ${os.release()}`);

Tested on Windows and MacOS computers.