demonstration video explaining all the features of the extension and how to use them - https://www.youtube.com/watch?v=KXRde3BNKEU
- Overview
- Features
- Installation
- Usage
- Extension Settings
- Known Issues
- Release Notes
- Contributing
- Code of Conduct
- Troubleshooting
- License
LeetCode Helper is a Visual Studio Code extension designed to streamline the process of solving LeetCode problems. It provides a seamless interface to write, test, and debug your solutions directly within VS Code.
- Fetch LeetCode Problems: Quickly fetch problem statements and test cases.
- Run Test Cases: Execute your code against provided test cases and see the results instantly.
- Solution File Management: Automatically generate and manage solution files.
- Error Handling: Detailed error messages to help you debug your code with Expected and Actual results.
- Panel for running commands:User can use the panel that is present on the left side to run command instead of using command panel(also added key bindings to all commands).
- Edit Testcases or add more test cases: User can either edit/add/delete testcases by going to the directory where the testcases file are saved by using "Get I/O File Directory".
- Open VS Code.
- Go to the Extensions view by clicking the Extensions icon in the Activity Bar on the side of the window.
- Search for
LeetCode Helper
. - Click Install.
- Open the Command Palette (
Ctrl+Shift+P
) or Directly access from left side panel - Type
LeetCode Helper: Fetch Problem
to fetch a new problem(add extra test cases too if you want too). - Write your solution in the generated file(in both python and c++).
- Run your test cases using
LeetCode Helper: Run Test Cases
. / or use CTRL+5.
This extension contributes the following settings:
leetcodeHelper.enable
: Enable/disable this extension.leetcodeHelper.language
: Set the default programming language for solutions.
- Some edge cases might not be handled correctly.
- for testing C++ you may need to parse the variables from input files manually depending on the data type inside the run_test_case function (please refer to this page for better understanding - https://stackoverflow.com/questions/9551014/reading-parsing-text-file-input-c)
- Limited support for languages(only python and cpp)
- All test are not checked in one go you need to check for each test case individually
- a clear falied messege might not show if your test case fails
- Initial release of LeetCode Helper.
We welcome contributions to improve this project. Please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make your changes and commit them with clear and concise messages.
- Push your changes to your forked repository.
- Create a pull request to the main repository.
We expect all contributors to adhere to our Code of Conduct. Please read it before contributing.
If you encounter any issues, try the following steps:
- Ensure you have the latest version of the extension installed.
- Check the extension settings to ensure they are configured correctly.
- Restart VS Code.
- If the issue persists, please open an issue on the GitHub repository.
This project is licensed under the MIT License - see the LICENSE file for details.
- Error Handling: Improved error handling in
extension.ts
andexecuteCode.ts
to capture actual output even when test cases fail. - Output Normalization: Added normalization for output comparison.
- Logging: Enhanced logging for better debugging.
- Solution File Management: Automatically generate and manage solution files.