简体   繁体   English

如何在 vscode linux 中配置实时服务器扩展以在已打开的浏览器 window 中打开新实例

[英]how to configure live server extension in vscode linux to open new instance in already open browser window

i am trying to configure my visual studio code(installed on ubuntu 18.04 LTS).我正在尝试配置我的 Visual Studio 代码(安装在 ubuntu 18.04 LTS 上)。 i use live server extension developed by ritwick dey to render my web page dynamically.我使用由ritwick dey开发的实时服务器扩展来动态呈现我的 web 页面。 but every time i run live server extension, it opens a new window of firefox (my default browser) that it attaches with visual studio code as a new window.但是每次我运行实时服务器扩展时,它都会打开一个新的 window 的 firefox(我的默认浏览器),它与 Visual Studio 代码一起作为新的 window 附加。 But i want the live server(extension) to open a new tab in the already open browser window.但我希望实时服务器(扩展)在已经打开的浏览器 window 中打开一个新选项卡。 I remember that in windows 10 OS live server opens a new tab in already open browser window.我记得在 windows 10 OS 实时服务器中,在已经打开的浏览器 window 中打开了一个新选项卡。 Is there any workaround that i can do to achieve the same result?我可以采取任何解决方法来达到相同的结果吗?

here is my vscode settings that i use globally.这是我在全球范围内使用的 vscode 设置 and here is the source code of live-server extension.这是实时服务器扩展的源代码。

thank you.谢谢你。

I'm not quite clear what you really need, when I open it, I open it in a new tab in the same browser, but if you need the server to update automatically, in my case I uninstalled it and installed it again in VScode, copy to estencion ext install ritwickdey.liveserver and it worked for me.我不太清楚你真正需要什么,当我打开它时,我在同一个浏览器的新选项卡中打开它,但是如果你需要服务器自动更新,在我的情况下,我卸载它并在 VScode 中再次安装它,复制到 estencion ext install ritwickdey.liveserver ,它对我有用。 I hope it helps you brother.希望对兄弟有帮助。

chek https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer https://es.stackoverflow.com/questions/205293/configurar-extencion-live-server-de-vs-codehttps://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer https://es.stackoverflow.com/questions/205293/configurar-extencion-live-server-de-vs-code

it happened with me also.它也发生在我身上。 In my case i have downloaded it from snap store and that issue happened but when i installed through external.deb file, it worked.在我的情况下,我已经从快照商店下载了它,并且发生了这个问题,但是当我通过 external.deb 文件安装时,它起作用了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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