Skip to content
| Marketplace
Sign in
Visual Studio Code>Education>LeetCaseNew to Visual Studio Code? Get it now.
LeetCase

LeetCase

Rudra Shah

|
2 installs
| (1) | Free
Fetch LeetCode example test cases by URL and run your solution locally — no account needed.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LeetCase

Run LeetCode test cases locally, straight from VS Code — no account needed.

Paste a LeetCode problem URL, fetch the example test cases, write your solution, and run all cases with one click. Results appear inline in the sidebar with pass/fail and timing. Everything executes on your machine via child_process — nothing is sent to any server.

LeetCase demo

Features

  • Fetch by URL — paste any LeetCode problem URL and hit Fetch
  • Local execution — runs your code with your local Python / Node / g++
  • Three languages — Python 3, C++, JavaScript
  • Boilerplate insertion — inserts LeetCode-style starter code with a ready-to-run manual input block at the bottom
  • Inline results — per-case pass/fail badge, actual vs expected output, stderr, and timing
  • No login required — uses the public LeetCode GraphQL endpoint

Usage

  1. Click the LeetCase icon in the activity bar to open the sidebar.
  2. Paste a LeetCode problem URL (e.g. https://leetcode.com/problems/two-sum/) and click Fetch.
  3. Select your language from the dropdown.
  4. Click ⤓ Boilerplate to insert starter code into your active editor.
  5. Write your solution inside the class Solution / function body.
  6. Click ▶ Run All Test Cases — results appear instantly below each case.

Supported Languages

Language Notes
Python 3 Full support — List, Optional, ListNode, TreeNode all handled automatically
C++ Auto-wrapped with <bits/stdc++.h> and a generated main(). Compiled with g++ -O2 -std=c++17
JavaScript Top-level function style (var twoSum = function(...){...}) matching LeetCode's editor

Settings

Setting Default Description
leetcase.python3Path python3 Path to the Python 3 executable
leetcase.nodePath node Path to the Node.js executable
leetcase.cppCompiler g++ C++ compiler command
leetcase.cppStandard c++17 C++ standard passed via -std=
leetcase.timeoutMs 8000 Per-testcase timeout in milliseconds

Notes

  • No account or login required — test cases are fetched from the public LeetCode GraphQL endpoint.
  • Everything runs locally — your code never leaves your machine.
  • Multiple valid answers — some problems accept any valid permutation (e.g. "return any valid answer"). For these, exact-match comparison may report a false failure — check the actual output to verify.
  • System-design / class-based problems (e.g. lru-cache, design-linked-list) use a different test format and are not currently supported.

License

Apache 2.0

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft