1

This is probably a stupid question, but I am new to coding. How can I make VSCode open Firefox display my HTML whenever I press run? Keep in mind that I am on Ubuntu.

Odysseus
  • 13
  • 3

1 Answers1

1

Create a file in your workspace .vscode/launch.json with the following contents:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Open in Firefox",
            "command": "firefox ${file}; exit",
            "request": "launch",
            "type": "node-terminal"
        },
    ]
}

Afterwards the run button should look like this and open your currently open file in Firefox:

enter image description here

carlfriedrich
  • 2,919
  • 1
  • 15
  • 29