VSCode安装LeetCode插件
VSCode安装LeetCode插件
一、LeetCode插件安装
在VScode的Extensions中搜索LeetCode,并点击install安装。
二、登录
输入账号密码登录,可能会报错:
login: (node:22564) Warning: Accessing non-existent property ‘padLevels’ of module exports inside circular dependency
(Use node --trace-warnings ...
to show where the warning was created)
pass: - Signing in leetcode.com
[ERROR] invalid password?
解决方法:
点击如下图标,切换为力扣中文版(如果是在中文版注册的账号)。
三、设置默认语言、存储地址
在VSCode的Setting中,可以设置默认的编程语言,和代码的存储位置,如下图所示:
四、其它报错
4.1 无法预览题目
Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state…
解决方法:重启VSCode。
4.2 提交代码时,报错[ERROR] session expired, please login again [code=-1]
解决方法:在力扣网站个人账号信息处,验证邮箱。