Live JavaScript logging with Quokka

If you’re using Visual Studio Code for writing JavaScript, the handy Quokka plugin will allow you to preview values at design time.

Add the Quokka extension via the Extensions Marketplace in VS Code.quokka_ext

Then, from the command palette, either create a new JavaScript file through Quokka, or start Quokka for an existing file.quokka2

Now you can attach the special comment /*?*/ to a variable to preview it’s value. Make sure that the comment touches the variable. The preview values will magically show up in the editor and the output console.

quokka3

Here is a live view:

quokka

 

Leave a Reply

Your email address will not be published. Required fields are marked *