Vscode学习笔记

958 阅读1分钟

配置远程ssh

# 安装插件Remote-SSH

# 配置SSH
# Ctrl + P 输入 remote-ssh:open configuration file
# 选择 C:\Users\Johnny\.ssh\config
# 配置连接属性 参考如下

# Ctrl + P 输入 remote-ssh:connect to host
# 选择设置的host

# 解决无法监控过多文件 Visual Studio Code is unable to watch for file changes in this large workspace
# 查看当前可监控文件数量
cat /proc/sys/fs/inotify/max_user_watches
# 修改课监控文件数量
sudo vim /etc/sysctl.conf # 设置 fs.inotify.max_user_watches=524288
# 运行生效
sudo sysctl -p
# 再次查看可监控文件数量
cat /proc/sys/fs/inotify/max_user_watches
Host ub
    HostName ub.com
    User johnny
    IdentityFile C:\Users\Johnny\.ssh\id_rsa # 私钥地址

解决无法监控过多文件

报错:Visual Studio Code is unable to watch for file changes in this large workspace

解决办法:

# 查看当前可监控文件数量
cat /proc/sys/fs/inotify/max_user_watches

# 修改课监控文件数量
sudo vim /etc/sysctl.conf # 设置 fs.inotify.max_user_watches=524288

# 运行生效
sudo sysctl -p

# 再次查看可监控文件数量
cat /proc/sys/fs/inotify/max_user_watches