Cover image for Take a screenshot of VSCode using Polacode Extension

Take a screenshot of VSCode using Polacode Extension

arbaoui_mehdi profile image Arbaoui Mehdi 🇲🇦 ・1 min read

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.

Install Polacode for vscode

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 > Polacode

Access Polacode Extension

Open any file including code, in my case, I'm using a JavaScript as an example, select the code and it will be shown in the right of the editor.

take a screenshot using vscode

I save the file code.png on the Desktop folder, so open the file to see the result.

Open Polacode Result

Posted on by:

arbaoui_mehdi profile

Arbaoui Mehdi 🇲🇦


JavaScript Coder, CSS Lover, Online Instructor 📚 https://www.youtube.com/user/freemh


markdown guide

The problem with code to image is accessibility. Ideally they would come with a link a a gist/etc with the actual code.

(edit) - It is still a really nice integration. :)


I totally agree, embedding a gist or a codepen would be a better solution for accessibility.