Sometimes I add some tweets that should include code, so we don't have the option to embed code on twitter, so for that, the only solution is to add an image, in this post I'll show you how to create a screenshot of your code from Visual Studio Code by using this extension Polacode
First, you've to install the extension, click on the
Extensions icon on the left sidebar of your editor to open the extensions Market place, then type
Polacode you'll find multiple ones, choose the one that has more downloads.
Then we've to show the command palette by using the shortcut
Cmd+Shift+P for Mac users, or
Ctrl+P for Windows users, then type
I save the file
code.png on the Desktop folder, so open the file to see the result.