Visual Studio Code (简体中文)
Visual Studio Code (VSCode)是一个跨平台,免费,开源 (使用MIT协议)的文本编辑器,由微软使用JavaScript和TypeScript开发 。它构建于Electron框架之上,并且极具扩展性。 可以在编辑器自带的应用商店,或者从 https://marketplace.visualstudio.com/VSCode 中安装扩展。 微软在AUR中提供了一个专有的二进制构建版visual-studio-codeAUR[broken link: package not found](使用一个最终用户许可协议授权)供普通用户使用。
安装
下列安装包包含了 VSCode:
- visual-studio-code-binAUR
- visual-studio-code-ossAUR[broken link: package not found]
- visual-studio-code-gitAUR[broken link: package not found]
- code-oss,来自非官方的 pkgbuild-current[broken link: invalid section] ,更多信息可以在它的README 。README中找到
调试 C#
如果你想调试 C#代码,安装 icu55AUR,否则的话,程序会报错:'Debug adapter process has terminated unexpectedly'
命令行启动
在命令行终端下,输入 code
即可启动。
如果你想打开多个实例,可以使用 -n
选项。
配置
Visual Studio Code配置文件保存在 ~/.config/Code/User/settings.json
.
集成终端
点击查看 > 集成终端 或使用快捷键Ctrl + `
打开集成终端。
一般情况下, Bash以不带任何附加选项的方式启动作为默认终端。
terminal.integrated.shell.linux
可以配置使用的终端,
terminal.integrated.shellArgs.linux
可以配置启动终端时的附加选项。
例子:
~/.config/Code/User/settings.json
"terminal.integrated.shell.linux": "/usr/bin/fish", "terminal.integrated.shellArgs.linux": ["-l","-d 3"]
外部终端
If you are using Terminator as default terminal for Arch and you have an error on Visual Studio Code: Unable to launch debugger worker process (vsdbg) through the terminal. spawn truecolor ENOENT
, you can change the terminal that will be used by Visual Studio to another terminal (eg gnome-terminal).
"terminal.external.linuxExec": "Yours alternative terminal"
sets the default terminal to be used for exec debug.
Example:
~/.config/Code/User/settings.json
"terminal.external.linuxExec": "gnome-terminal"