A focused, LeetCode-style testcase runner for C++ in Visual Studio Code. It is independent of Competitive Programming Helper (CPH) and does not modify CPH or your global VS Code settings.
Features
Add and delete persistent testcases
Run one testcase or all testcases
Compile the active C++ file and pass testcase input through stdin
Compare expected and actual output with trailing whitespace normalization
Accepted, Wrong Answer, Compile Error, Runtime Error, and Time Limit Exceeded verdicts
Runtime and stderr display
Configurable compiler, compiler arguments, and timeout
Usage
Open a .cpp file.
Select CPH Modern in the Activity Bar.
Enter input and expected output, then choose Run or Run All.
The file is saved before compilation. By default, the extension uses clang++ on macOS and g++ on other platforms with C++17 enabled.
Settings
cphModernUI.compilerPath: compiler executable or absolute path
cphModernUI.compilerArgs: arguments placed before the source path
cphModernUI.timeoutMs: execution timeout per testcase (100–30000 ms)
Development
npm install
npm run compile
Press F5 in VS Code to open an Extension Development Host. Build an installable package with npm run package.
Safety
Compiler and program processes are started without a shell, output is capped at 1 MB, timed-out process groups are terminated, and temporary executables are removed after each run.