vscode 通過ssh連接服務器卡斷問題
vscode 通過ssh 連接服務器卡頓
背景:每次通過vscode連接vps服務器,服務器CPU都爆表,占用率支持100%,導致無法在終端執行任何操作
新建remote settings.json,Ctrl+Shift+P 輸入Preferences: Configure Remote Settings 選擇Remote: Configure Settings,或者選擇open remote setting.json,前提是先連接服務器,不然沒有open remote setting.json的選項,添加過濾服務器中某些大且深的目錄,防止掃描,例如:
{
"files.watcherExclude": {
// ".autorelabel": true,
// "bin": true,
// "boot": true,
// "currentPathFileName.json": true,
// "data": false,
// "dev": true,
// "dingkang": false,
// "docker-compose": false,
// "etc": true,
// "getCurrentDirAllFileName.sh": true,
// "home": true,
// "lib": true,
// "lib32": true,
// "lib64": true,
// "libx32": true,
// "lost+found": true,
// "media": true,
// "mnt": false,
// "opt": true,
// "path": true,
// "proc": true,
// "root": true,
// "run": true,
// "sbin": true,
// "snap": true,
// "srv": true,
// "swap": true,
// "sys": true,
// "test": true,
// "tmp": true,
// "usr": true,
// "var": true,
// "wget-log": true,
// "wget-log.1": true,
// "wget-log.2": true
},
"files.exclude": {
"etc": true,
"home": true,
"mnt": true,
},
"search.exclude": {
"etc": true,
"home": true,
"mnt": true,
}
}
一臺服務器只用配置一次,這個配置會自動存儲在服務器中,后面即使換電腦也能直接流暢連接
本文來自博客園,作者:南宮影,轉載請注明原文鏈接:http://www.rzrgm.cn/nangongying/p/18983437

浙公網安備 33010602011771號