VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

问题描述:

VSCode中LeetCode插件怎么安装并使用?VSCode中想要安装LeetCode插件,该怎么安装,安装后该怎么使用呢?下面我们就来看看LeetCode插件安装教程

VSCode中想要安装LeetCode插件,该怎么安装和使用呢?下面我们将分享安装教程和使用教程。

一、安装LeetCode插件

首先确保电脑安装了Node.JS,没安装的可以自行搜索安装并配置环境变量。

VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

可以先安装VSCode中文语言包。使用键盘按键组合:Ctrl + Shif + P,随后在弹出的搜索框中,输入Configure Display Language,看到此时二级菜单显示“en”和“Install additional languages”,此时我们选择后者"Install additional languages",进行语言包安装。

VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

在左侧的搜索结果中,选择需要的语言包,比如中文语言包,选择Install,点击安装,此时它会提示:重启VSCode之后即可使用中文。

VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

重启之后,我们可以看到汉化后的界面,此时在主页面,点击左侧工具栏中的插件按钮,可以选择插件进行安装。

接着打开VSCode,点击左侧的方块按钮

VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

然后搜索LeetCode,点击安装,如下图所示

VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

接下来左侧就多出了一个按钮,点击它

VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

然后点击sign in,如下图所示

VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

最后输入用户名和密码登录即可

VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

二、使用Leetcode插件做题

点击进入leetcode插件后,点击顶部左二,形如地球的图标,将切换LeetCode为中文版leetcode-cn.com后,再登录你的账号,控制台中会输出你的登录信息。

VSCode中LeetCode插件怎么安装并使用? LeetCode插件安装教程

如果账号密码认证错误,有可能是用户名输错了,我用手机号注册的LeetCode,插件识别的用户名并不是设置的字符串ID,而是手机号。