How to open html files directly from visual studio to my default browser?

Asked

Viewed 6,898 times

5

I use visual studio code on Ubuntu, and would like to know if you have any way to open an html file with just one click for my default browser

2 answers

2

Open in browser - Just add this extension to your Visual Studio. I hope I’ve helped!

Follows images.

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

  • 1

    this extension does not work on my OS :/

2


Press Ctrl+ shift+ p(or F1) to open the command palette.

Type Tasks - Configure Task in the older versions Configure Task Runner. When selecting, the tasks.json file opens. Delete the displayed script and replace it with the other:

{
    "version": "0.1.0",
    "command": "explorer",    
    "windows": {
        "command": "explorer.exe"
    },
    "args": ["test.html"]
}

And there’s also this extension

Live Server Preview

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.