简体   繁体   中英

How do I set up VS Code Live Server extension to use Firefox Developer on Linux?

I'm currently running Elementary OS 5.1.7 Hera, and just downloaded Firefox Developer edition, which runs independent to the regular Firefox, so Live Server extension doesn't recognize FDE.

for macOS users, this should be "liveServer.settings.CustomBrowser": "/Applications/Firefox Developer Edition.app"

The Live Server extention opens the localhost tab on your default browser, but you can copy the URL into any other browser and it will work, as long as the server is running.

If you want the tab to always open in Firefox Developer Edition, you can change the settings of Live Server.

  • In VScode, go to File > Preferences > Settings (or Code > Preferences > Settings on Mac)

  • In the search bar, type liveServer.settings.AdvanceCustomBrowserCmdLine

  • Click on Edit in settings.json

  • change the value of "liveServer.settings.AdvanceCustomBrowserCmdLine" to the location of Firefox Developer Edition (for example, C:\Program Files\Firefox Developer Edition\firefox.exe )

Note: Live Server also has a CustomBrowser setting, which is simpler to edit, but it has limited options and Firefox Developer Edition is not one of them. AdvanceCustomBrowserCmdLine overrides CustomBrowser .

You can read the Live Server docs here .

Do not make the same mistake I did, don't use quotation marks. Use this line inside your json file, if you want to use the Firefox Developer Edition default location:

"liveServer.settings.AdvanceCustomBrowserCmdLine": C:\Program Files\Firefox Developer Edition\firefox.exe,

Goto to settings

Search for liveServer.settings.AdvanceCustomBrowserCmdLine

Click on Edit in settings.json

Find "liveServer.settings.AdvanceCustomBrowserCmdLine": "",

Now put Firefox Developer Edition file location on the value.

Like this:

"liveServer.settings.AdvanceCustomBrowserCmdLine": "C:\\Program Files\\Firefox Developer Edition\\firefox.exe",

Dont forget to put // (double slash on it);););)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM