🚀 Features
Better LeetCode brings the full LeetCode experience directly into your IDE with native support and no annoying boilerplate code.
- Flexible Submission: Submit solutions against default test cases or hidden test cases effortlessly.
- Language Switch on the Fly: Change your target programming language seamlessly from the editor.
- No Boilerplate Comments: Write clean, standard code; the extension natively manages the underlying boilerplate.
- Native VS Code Tooling: Leverage VS Code's rich syntax highlighting, IntelliSense, auto-complete, and extensions.
- Integrated Debugger: Step through your code using VS Code's native debugger.
- Study Lists: Easily track and complete curated LeetCode study lists.
- Daily Problems: Quickly fetch and solve the daily LeetCode challenge with a single click.
Screenshot

🔑 Authentication / Login
To interact with LeetCode (fetch premium problems, submit solutions, track progress), you need to log in by providing your LeetCode Session Token and CSRF Token.
- Go to LeetCode.com and log in.
- Open your browser's Developer Tools (usually
F12 or Cmd+Option+I).
- Navigate to the Application tab (Chrome/Edge) or Storage tab (Firefox).
- Under Cookies, select
https://leetcode.com.
- Find the cookie named
LEETCODE_SESSION and copy its value.
- Find the cookie named
csrftoken and copy its value.
- In VS Code, run the command
Better LeetCode: Sign In from the Command Palette (Cmd+Shift+P / Ctrl+Shift+P).
- Paste the tokens when prompted to authenticate your extension.
🛠️ Getting Started for Development
1. Prerequisites
- VS Code (version
^1.90.0 or higher)
- Node.js (version
^20.0.0 or higher)
- Bun (preferred package manager)
2. Install Dependencies
Initialize and install the required dependencies using Bun:
bun install
3. Compile and Run the Extension
To run and debug the extension locally:
- Open the project directory in VS Code.
- Press
F5 (or go to the Run and Debug view and select "Run Extension").
- A new window named [Extension Development Host] will launch.
- Open the Command Palette and type
Better LeetCode: Show Problem Statement or any other extension command to test it.
📦 Publishing the Extension
We use GitHub Actions to automate publishing the extension to the Visual Studio Marketplace.
Automated Publishing via GitHub Actions
- Ensure your extension version is updated in
package.json.
- Push your changes to the
main branch.
- Create a Release on GitHub with the new version tag (e.g.,
v1.0.0).
- The GitHub Actions workflow will automatically bundle and publish the extension.
Note: You must have the VSCE_PAT secret configured in your repository settings (Settings > Secrets and variables > Actions). This Personal Access Token should be generated from your Azure DevOps organization with "Marketplace" > "Manage" scopes.
Manual Publishing
If you need to publish manually from your local machine:
- Install
vsce globally:
npm install -g @vscode/vsce
- Package the extension:
bun run package
vsce package
- Publish the extension:
bun run publish
📄 Coding Guidelines
To maintain code quality and stability, please adhere to the rules defined in AGENTS.md:
- TypeScript Only: Write clean, type-safe TypeScript. Do not use the
any type under any circumstances.
- SOLID Principles: Keep components focused, modular, and decoupled.
- Comprehensive Testing: Write unit and integration tests for all core features and edge cases.
☕ Support
If you find this extension helpful and it saves you time, consider buying me a coffee to support its ongoing development!
