问题描述
我有Ubuntu 16.04,一旦安装它,我必须下载Visual Studio Code的C#扩展,但它没有效果.然后,vscode给我和建议,我应该以管理员权限打开vscode以使安装的扩展生效,所以我在终端上写道:
I have Ubuntu 16.04 and I have to download the C# extension for Visual Studio Code, once I installed it, It doesn't make effect. Then, vscode give me and advice that I should open vscode with admin privileges to make effect of the extensions installed, so I wrote on my terminal:
sudo code .
但它不起作用,终端机将我扔了:
but it doesn't work, the terminal throws me:
It is recommended to start vscode as a normal user. To run as root, you must specify an alternate user data directory with the --user-data-dir argument.
It is recommended to start vscode as a normal user. To run as root, you must specify an alternate user data directory with the --user-data-dir argument.
但我不知道如何指定备用用户数据目录.我正在Visual Studio代码文档中搜索如何执行此操作,但是没有针对此问题的参考.如果您知道如何在Linux中以管理员权限打开,请帮助我.
but I don't know how to specify an alternate user data directory. I was searching how to do that in visual studio code docs but there is not a reference for this issue. If you know how to open with admin privileges in linux please help me.
推荐答案
要以超级用户身份运行:
To run with superuser:
$ sudo code --user-data-dir=~/root
通过这种方式,您无需设置即将发布的补丁1.5.0中的参数就可以运行.
By the way you will be able to run without setting params in the upcoming patch 1.5.0.
这篇关于如何使用管理员权限打开Visual Studio代码以使已安装的扩展名生效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!