简体   繁体   English

VS code Live Server Web 扩展服务器端口8080问题

[英]VS code Live Server Web Extension server port 8080 problem

I am using vs code as a code editor for PHP.我正在使用 vs code 作为 PHP 的代码编辑器。 To view live time update I use vs code live server extension for chrome.要查看实时更新,我使用 chrome 的 vs code live server extension。 Using Xampp(apache) for the PHP server.对 PHP 服务器使用 Xampp(apache)。 But suddenly I notice that some apps blocked my port 80 of windows 10 so I change the port for apache as 8080. Then my live server stopped working.但突然我注意到一些应用程序阻止了我的 windows 10 的端口 80,所以我将 apache 的端口更改为 8080。然后我的实时服务器停止工作。

Can anyone tell me why this happened?谁能告诉我为什么会这样?

I want to add that if I change other ports like 8000 it works perfectly, what's wrong with 8080?我想补充一点,如果我更改其他端口,例如 8000,它可以完美运行,8080 有什么问题? is there any other limited ports for the liver server?肝脏服务器还有其他受限端口吗?

It's highly possible that vscode live server use port 8080 internally vscode live server内部使用8080端口的可能性很大

When Xampp is set to another port than 8080 and live server is started, use the following command in cmd to display a list of process using that port:当 Xampp 设置为 8080 以外的其他端口并启动实时服务器时,在 cmd 中使用以下命令显示使用该端口的进程列表:

netstat -an | find /i "8080"

The PID of the process using that port is at the end of the line, then do the next command by replacing with that number to find out which process opened it, you can also look in your task manager for that.使用该端口的进程的PID位于该行的末尾,然后通过替换该数字来执行下一个命令以找出哪个进程打开了它,您也可以在任务管理器中查看。

C:\  tasklist /svc /FI "PID eq <PID>"

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

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