Visual Studio代码(VSCode)-错误:调试适配器进程意外终止 [英] Visual Studio Code (VSCode) - Error: Debug Adapter Process Has Terminated Unexpectedly

查看:450
本文介绍了Visual Studio代码(VSCode)-错误:调试适配器进程意外终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力解决此错误消息。有时,升级或重新启动编辑器后,我无法在Visual Studio Code上运行 xdebug 。以下是错误的屏幕截图:

I'm struggling with this error message. Sometimes I cannot run xdebug on Visual Studio Code after upgrading or restarting the editor. Here's a screenshot of the error:

< img src = https://i.stack.imgur.com/PKDAY.png alt =在此处输入图片描述>

任何人都可以帮助我吗?

Can anyone help me with this?

推荐答案

几分钟后,找出我的机器上发生了什么,我想出了解决问题的方法。

After several minutes to find out what happens on my machine, i figure it out how to solve my problem.

由于 xdebug 正在基于端口 9000 运行,因此我在调试控制台(VSCode)有消息监听EADDRINUSE ::: 9000 ,我认为端口<上有另一个进程正在运行code> 9000 所以我检查此命令正在运行什么进程

Because the xdebug is running based on port 9000 and i see on the Debug Console (VSCode) has message listen EADDRINUSE :::9000, i think there is an another process running on port 9000 so i check what process running on it by this command

sudo netstat -nlp | grep :9000

上面的命令将向您显示在端口 9000上运行的进程,然后我得到这个结果

The command above will show you what process running on port 9000, then i get this result

tcp6       0      0 :::9000                 :::*                    LISTEN      14856/hhvm

HHVM 默认情况下已接管xdebug的端口,所以我需要关闭服务或更改端口号。

HHVM was take over port of xdebug by default, so i need to take it service down or change the port number.

提示:

您还可以使用 lsof 查看特定端口上的进程

You can also use lsof to view process on specific port

lsof -t -i :9000

这篇关于Visual Studio代码(VSCode)-错误:调试适配器进程意外终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆