Access LeetCode through VS Code step by step.
This guide is primarily for individuals who are unable to log in to LeetCode within VS Code using the repository https://github.com/LeetCode-OpenSource/vscode-leetcode.
If you encoutner the error after running the command
leetcode user -c
login: (node:5080) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ...
to show where the warning was created)
-
Then go to this link to dowload the modified version https://marketplace.visualstudio.com/items?itemName=Adaex.vscode-leetcode&ssr=false#overview
-
Install the extenstion
- After install the extension in vscode you log into leetcode.com in a browser. In Chrome, right click and select "Inspect". Switch to tab "Network", "XHR". Then click any button on leetcode.com(now should be on the left split screen). Now you should be able to see the cookie as showed in the pic.
Copy the two cookie csrf and LEETCODE_SESSION Like this example csrftoken="your-csrk-token"; LEETCODE_SESSION="you-leetcode-session";
-
Add you username or email you use to login in leetcode
-
Paste your cookie in step 3
-
Hit enter then wait a bit for the extenstion to work
Happy leetcoding!