
With your application and server running, now you can open the browser preview. Learn more about how to set up the Live Server extension in VS Code! If you are using vanilla JavaScript, you can use the Live Server extension to serve your site from a live-reloading server. they come pre-packaged with a live-reloading server. If you're using react, angular, vue, etc. So, you'll need to start your application locally with a live-reloading server. This extension basically opens a (headless) browser window inside of VS Code. Now that you have the extension installed, let's see how to use it. Then search for Browser Preview and click install. Start by opening the extensions tab inside of VS Code. This is fine too, but with the Browser Preview, you can get the same type of view right inside of your editor. Want to learn everything you need to know about VS Code? Check out the Learn Visual Studio Code courseĪlternatively, I've also tried setting VS Code and Google Chrome to take up 50% of my screen so they can sit side by side. This works fine but it can be a bit hard to follow for a user. Most often, I end up switching between the two applications with shortcuts.

Let's see how to do it.Īs someone who records lots of videos, I'm constantly searching for the best way to display both my browser and my VS Code window at the same time. Setting up your Visual Studio Code browser preview is just a few clicks away. Run the console application and the below screen output appears.Did you know you can view a live-reloading browser preview right inside of Visual Studio Code? Well, with the Browser Preview extension, you can do just that. Type the following command: dotnet run.NET Core packages that are needed to build your project Run dotnet restore command to resolve the dependencies of the project and give you access to the required.Repeated Step 3 for opening the terminal command prompt.Enter the below command to open the ConsoleApplication project in VS Code.Switch the path to the folder ConsoleApplicationdemo using the below command.Puts you into the newly created app directory. The -o parameter creates a directory named ConsoleApplicationDemo where your app is stored and populates it with the required files. The dotnet command creates a new application of type console for you.

