VS Code Extensions
LeetCode Local Runner

LeetCode Local Runner

by cinnamennen

Run TypeScript/JavaScript LeetCode solutions locally with auto-fetched test cases

Downloads

6

Rating

— (0)

Version

0.2.1

Last updated

Jun 12, 2026

A VS Code companion extension for vscode-leetcode that adds a ▶ Run Locally button to your TypeScript and JavaScript solution files, letting you print-statement debug without submitting to LeetCode's servers.

How it works

  1. Open a .ts or .js solution file created by the vscode-leetcode extension
  2. Click ▶ Run Locally above // @lc code=start
  3. The extension fetches the example test cases from LeetCode's API, generates a test driver, and runs your solution locally in the integrated terminal

Example output for LRU Cache:

Case 1: [null,null,null,1,null,-1,null,-1,3,4]

Example output for Two Sum:

Case 1 [nums=[2,7,11,15], target=9]: [0,1]
Case 2 [nums=[3,2,4], target=6]: [1,2]

Requirements

Configuration

Setting Default Description
leetcodeLocal.cacheMaxAge 86400 Seconds to cache fetched problem data. Set to 0 to always fetch fresh.

Supported languages

TypeScript and JavaScript only. The solution file must follow the ID.problem-slug.ts naming convention produced by vscode-leetcode.

Related extensions