1,sudo gedit /usr/bin/code
修改ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"为:
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@" --user-data-dir=/home/Flying_Motor/hdd/.cache/code-cache
2,sudo gedit /usr/share/applications/code.desktop
修改Exec=/usr/share/code/code --unity-launch %F为:
Exec=/usr/share/code/code --unity-launch --user-data-dir=/home/Flying_Motor/hdd/.cache/code-cache %F
修改Exec=/usr/share/code/code --new-window %F为:
Exec=/usr/share/code/code --new-window --user-data-dir=/home/Flying_Motor/hdd/.cache/code-cache %F
3,如果使用C++扩展,也可以修改C++扩展缓存位置
默认C_Cpp: Intelli Sense Cache Path设置项为空,也就是使用默认缓存位置。
在setting中搜索“C_Cpp: Intelli Sense Cache Path”,填入自己想要的位置即可。
本文指导如何修改Electron应用的Code编辑器配置,将用户数据目录指向自定义位置,同时介绍了C++扩展缓存路径的设置,确保高效开发和数据一致性。
907

被折叠的 条评论
为什么被折叠?



