Problem:
I need to view the current HTML file in my default browser
from inside Visual Studio Code (VS Code).
Solution:
Configure a task in tasks.json to open the current file.
Explanation:
I was recently working through a git
tutorial where I was writing a lot of HTML.
The Zen
Coding support in VS Code allowed me to crank out the HTML very
quickly. However, there was no way to
quickly view the page in a browser.
Luckily I was able to use VS Code’s task integration
facilities to solve this issue. Now with
the attached tasks.json file in the .settings folder I am able to view the
active file in my default web browser by simply pressing Ctrl + Shift + B.
tasks.json (136B)