Vs code触发反恶意软件服务可执行文件使用高CPU

huangapple go评论143阅读模式
英文:

Vs code triggering antimalware service executable to use high cpu

问题

我昨天注意到我的系统几乎使用了100%的CPU和内存。我发现每当我使用VS Code时,Antimalware Service Executable一直使用超过60%的CPU。

我关闭了实时保护,然后VS Code使用了接近100%的内存。我尝试了多次关机,但每次打开VS Code时问题都会再次出现。

我昨天刚刚更新了我的VS Code。我该怎么办?

英文:

I noticed since yesterday my system using close to 100% CPU and memory. I found whenever I am using VS Code the Antimalware Service Executable uses above 60% of CPU usage all the time.

I turned off real-time protection and then problem with VS code using closely 100% of memory. Tried hard and shutdown the system, this issue keep coming whenever I opened VS Code.

I just updated my VS Code yesterday. What should I do?

答案1

得分: 3

你可以在 Windows 防恶意软件的设置中告诉它信任 VS Code。如果问题真的是由运行在单独进程中的扩展程序引起的,你还需要告诉它信任这些程序。请查看Windows文档以了解如何操作。

例如,在 Windows 11 中:

  1. 选择“开始”,然后打开“设置”。在“隐私与安全性”下,选择“病毒与威胁防护”。
  1. 在“病毒与威胁防护设置”下,选择“管理设置”,然后在“排除项”下,选择“添加或删除排除项”。
  1. 选择“添加排除项”,然后从文件、文件夹、文件类型或进程中进行选择。文件夹排除项将应用于文件夹中的所有子文件夹。

如果即使在没有启用任何防病毒程序的情况下,VS Code 仍然使用100%的CPU,那么肯定出现了严重问题,也许你应该尝试卸载并重新安装它。

英文:

You can tell Windows anti-malware to trust VS Code in its settings. If the problem is really due to an extension that runs separate programs in separate processes, you'd also need to tell it to trust those programs. See the Windows docs for how to do this.

Ex. for windows 11:

> 1. Select Start, then open Settings. Under Privacy & security, select Virus & threat protection.
>
> 1. Under Virus & threat protection settings, select Manage settings, and then under Exclusions, select Add or remove exclusions.
>
> 1. Select Add an exclusion, and then select from files, folders, file types, or process. A folder exclusion will apply to all subfolders within the folder as well.

If VS Code uses 100% CPU with no antivirus enabled at all though, something is really wrong and maybe you should at least try uninstalling and reinstalling it.

答案2

得分: 1

作为一名C#开发者,在使用Visual Studio时,我发现添加以下排除项可以改善构建时间...

添加[Folder]项目路径

添加[Process] aspnet_compiler.exe

添加[Process] csc.exe

添加[Process] VBCSCompiler.exe

另外提一下:我尽量在一个相对安全的环境中运行,所以我个人不担心这些规则会引起安全问题,但应该考虑排除这些项目可能导致的安全后果。

英文:

As a c# developer, using Visual Studio, I found that adding the following exclusions to improve build times...

Add [Folder] project(s) path

Add [Process] aspnet_compiler.exe

Add [Process] csc.exe

Add [Process] VBCSCompiler.exe

As a sidenote: I try to run a pretty secure environment, so I am personally not worried about these rules causing security issues, but one should take into account the security consequences of excluding these items.

huangapple
  • 本文由 发表于 2023年3月12日 10:26:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/75710752.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定