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.
Asked
Active
Viewed 437 times
1
-
Please give more information about what you want to run and how. For example, and you developing a React or Vue app with Vite? – Nick McCurdy Oct 15 '22 at 07:54
-
Possible duplicate of [this](https://stackoverflow.com/a/48721885/19860022) – Cornelius-Figgle Oct 15 '22 at 08:17
-
I have a simple HTML site and I want to view it on Firefox whenever click run. – Odysseus Oct 15 '22 at 08:20
1 Answers
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:

carlfriedrich
- 2,919
- 1
- 15
- 29