ritwickdey / vscode-live-server-plus-plus

VsCode Live Server++ : It's Truly Live 😊 (BETA) -- [NOT RELEASED YET]
MIT License
515 stars 318 forks source link

What launch.json configuration is needed to open in Live Server? #19

Open AlGantori opened 2 years ago

AlGantori commented 2 years ago

I would like to be able to open VSCode and press F5 to launch the currently viewed .html file into the live server without having to know it's Alt-L Alt-O key combination.

I tried the Run / Add Configuration however what got added into launch.json is not "run in live server" Any insights on how to achieve press F5 to run would be much appreciated. Thank you.

image

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

        {
            "type": "pwa-chrome",
            "request": "launch",
            "name": "Open index.html",
            "file": "s:\\_W\\ARP\\UPS.Help\\SRC\\UPS.Help\\Info\\index.html"
        }
    ]
}
AlGantori commented 2 years ago

Thru some guess work I got the following to partially work, I say partially because:

  1. It does open the current viewed file into the live server
  2. When switching to another .html file and pressing F5 it does NOT launch them until the first is closed.

image

Reference for the variables available in launch.json here https://code.visualstudio.com/docs/editor/variables-reference