- Login to leetcode in browser
- Extract LEETCODE_SESSION and csrftoken from browser developer tools
- Form the cookie string "LEETCODE_SESSION=<leetcode_session_value>;csrftoken=<csrftoken_value>"
- Go to vs code, once you install LeetCode plugin, click sign in (with leetcode cookie).
- Enter user name and enter
- Paste the cookie string created and enter.
- You should be logged in by now.
Now click on the leetcode plugin. You should see "Leetcode: Problems" -> "All" Select a problem, you should be able to see "code now". Code and submit.
refer: link