Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Competitive Programming Helper: Leetcode (cph-lc)New to Visual Studio Code? Get it now.
Competitive Programming Helper: Leetcode (cph-lc)

Competitive Programming Helper: Leetcode (cph-lc)

CPH Leetcode

|
94 installs
| (0) | Free
Fetch and run Leetcode sample test cases seamlessly within your VS Code environment
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CPH Leetcode Extension for VS Code

CPH Leetcode is a Visual Studio Code extension designed to streamline competitive programming workflows by integrating Leetcode functionalities directly into the editor. Solve problems, fetch test cases, and run solutions—all without leaving VS Code!


Features

  • Works with LeetCode
  • Fetch sample test cases for problems and store them locally.
  • Run solutions against fetched test cases directly in VS Code with real-time results.
  • Access features through the CPH Leetcode UI in the VS Code activity bar.
  • Shows discrepancies if actual output does not match expected output.

Screenshots/Demo Video

Custom UI in Activity Bar

Custom UI


Installation

  1. Open Visual Studio Code.
  2. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window.
  3. Search for Competitive Programming Helper: Leetcode (cph-lc).
  4. Click Install to install the extension.

Alternatively, you can install directly from the Visual Studio Marketplace.


How to Use

  1. After installation, navigate to the CPH Leetcode view in the activity bar.
  2. Use the following commands from the Command Palette:
    • CPH: Fetch Test Cases: Fetch sample test cases for a problem.
    • CPH: Run Test Cases: Execute your code against the fetched test cases.

Alternatively, you can interact with the UI in the activity bar and perform the same actions.


Supported Languages

  • C++
  • Python3

Upcoming Major Updates

  • Support for Java
  • Feature for user to extract test cases for Leetcode daily challenge from extension itself
  • Allow users to change default storage folder for test cases (which is currently "TestData" in same working directory)

Project Structure

  • icons: Contains the logo and icons for the extension.
  • helper-functions/: Includes utility functions for test case fetching, test case execution, and to fetch HTML for the UI of Extension.
  • extension.js: Main Logic for the extension goes here.
  • final.py: Python script to fetch sample test cases from desired URL.

Contributing

Contributions are welcome! To contribute:

  1. Fork this repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -am 'Add a new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new Pull Request.

License

This project is licensed under the MIT License. See the LICENSE file for details.


Author

Made with ❤️ by Akash. If you find this extension helpful, please give it a ⭐ on GitHub.

Also, if you encounter any issues, or have any questions, feel free to contact me at akashsingh242678@gmail.com

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