Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>LeetCode Runner (Java)New to Visual Studio Code? Get it now.
LeetCode Runner (Java)

LeetCode Runner (Java)

Spy48

|
3 installs
| (0) | Free
Pick LeetCode problems, test and submit your Java solution without leaving VS Code. Failed submission cases are saved and re-run on every test.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

LeetCode Runner (Java) for VS Code

Pick a LeetCode problem, write Solution.java, then test and submit without leaving VS Code. Cases that fail during Submit are saved automatically and run with every later Test. After a submit, your submission page opens in the browser so you can compare with other solutions.

Plain JavaScript, no dependencies, no build step.

Install

From the .vsix file (VS Code: Extensions view, ... menu, Install from VSIX...), or:

code --install-extension leetcode-runner-0.1.0.vsix

Run from source: open this folder in VS Code and press F5.

Use it

  1. Open a folder for your practice (the extension keeps Solution.java there).
  2. Click the </> icon in the Activity Bar, or the status bar item, or press Ctrl+Shift+P and type LeetCode.
  3. Pick Problem: enter a number, slug or URL, or choose Next / Previous / Today's daily.
  4. Write your solution in Solution.java.
  5. Click Test or Submit (CodeLens above class Solution, the editor title bar, or the sidebar).
  6. First time: Login / Account asks for your LEETCODE_SESSION and csrftoken cookies (log in at leetcode.com, press F12, Application/Storage, Cookies). They are stored encrypted in VS Code's secret storage, never in your project.
Command What it does
LeetCode: Pick Problem Loads a problem and replaces Solution.java with its starter code
LeetCode: Show Description Description in a side panel
LeetCode: Test Runs examples + saved failed cases on LeetCode
LeetCode: Submit Real submission, verdict panel, opens your submission page
LeetCode: Login / Account Sign in, check session, sign out
LeetCode: Clear Failed Cases Removes saved failing cases for the current problem

Files created in your folder: Solution.java, tests/<number>-<slug>.json (saved failed cases) and .lcrunner/problem.json (current problem). They are the same files the Java and Python command-line editions use, so you can switch between them.

Picking a new problem overwrites Solution.java. Earlier saved versions are in the editor's Timeline view.

Settings

  • leetcodeRunner.confirmSubmit (default on): ask before submitting.
  • leetcodeRunner.autoOpenSubmission (default on): open the submission page after Submit.

Build the .vsix yourself

npm install
npm run package

Notes

This uses LeetCode's unofficial web endpoints, so it may break if they change, and Cloudflare can sometimes block requests (you'd see a 403). Automated submission may be restricted by LeetCode's terms. Set publisher in package.json to your own publisher id before publishing to a marketplace.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft