Visual Studio Code and open the program that is associated with the file’s extension. This article covers both Mac and Windows.

Mac

  1. CMD-Shift-P
  2. Tasks: Configure Task
  3. Add this JSON to the task
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Open file",
      "type": "shell",
      "command": "open",
      "args": ["${file}"]
    }
  ]
}

Windows

  1. Ctrl-Shift-P or F1
  2. Tasks: Configure Task
  3. Add this JSON to the task file
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "Open file",
      "type": "shell",
      "command": "explorer.exe",
      "args": ["${file}"]
    }
  ]
}

References

How to view my HTML code in the browser with Visual Studio Code?