✍️述
vscode在开发过程中会突然出现cpu过高,电脑声音变大「mac」
节省大家「此处指开发者们」的时间,直接给出解决方案
通过google后进入官方讨论区「issues」,大家都有遇到这个问题。

📖1. 重点 - 我自己的问题
// 描述如下
vscode electron node js server.js | 查看vscode进程可看到,这个占用cpu超高
//
// 解决方法
"typescript.disableAutomaticTypeAcquisition": true | settings.json
//
1
2
3
4
5
6
7
2
3
4
5
6
7
📖2. 设置文件watch过滤
// 解决方法 | settings.json
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/tmp": true,
"**/node_modules": true,
"**/bower_components": true,
"**/dist": true
},
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true,
"**/tmp/**": true,
"**/bower_components/**": true,
"**/dist/**": true
},
//
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
📖3. 设置和建立索引相关「未生效对我」
// settings.json
"search.followSymlinks": false,
//
1
2
3
2
3
📖4. guideline
如果还未解决可尝试对自己extentions进行开关排查,大概率的情况是插件导致的