Is there extansion that shows live code preview like in freecodecamp?

is there extension that shows live code preview like in freecodecamp?
for example when I console.log(something) i can see it update live, is there something like that for vscode?

1 Like

You mean in JS?

Sure, but it really depends on what you are doing. If you are doing a Node thing, you have use something like nodemon to rerun your app every time you make a change. That can be in a terminal window in VS Code or in a separate terminal window. If you are working on a web page and are using some kind of a bundler, there are live servers that will update.

Keep in mind that these update on save, not as you type. But I find the latter very, very annoying anyway.

Thank you, yes that I what i want but when I search for nodemon on the vscode marketplace, I can’t find it, do you have a link?

nodemon is not part of VS Code. It is an npm package. You probably just do something like npm install -g nodemon or something like that. I don’t know for sure, google “npm nodemon”.

It doesn’t specifically run in VSC code but runs in your terminal. Instead of running node myApp.js, you run nodemon myApp.js and it restarts whenever you make a change. You can run it in the terminal in VSC.

But again, that is assuming you are working on a node app. And I’m sure there is some VSC extension that will do something similar - I don’t know, I mostly work on webpack-ed projects.

Explore, try some things out, see what works for you.

There was a good video on the free code camp youtube that showed some nice extensions for VScode, one of them being Quokka.js.

You still need to install node i believe, but it will show you console logs right next to where you put them.