Once a mighty Competitive Programming plugin... Reborn with the powers of VSCode!
- π Minimal and adaptive UI for maximized functionality and view utilization
- πͺ² Extension agnostic configuration for VSCode debugging UX with real-time inputs
- π Built-in stress tester as a first-class feature
- π¨οΈ First-class support for interactive problems within both Judge and Stress Tester!
- π Support for Competitive Companion to gather problem inputs easily
- π Insert file templates without leaving your code
- β‘ BLAZINGLY FAST! Asynchronous design + optimizations = 99% spam proof!
π₯ Fast Olympic Coding is available on Visual Studio Marketplace and Open VSX Registry
Provide run settings for the languages you use in runSettings.json at the root folder. Here is the default example configuration for C++, Python, and Java:
{
".cpp": {
"compileCommand": ["g++", "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}"],
"runCommand": ["${fileDirname}/${fileBasenameNoExtension}"]
},
".py": {
"runCommand": ["python", "${file}"]
},
".java": {
"compileCommand": ["javac", "${file}"],
"runCommand": ["java", "-cp", "${fileDirname}", "${fileBasenameNoExtension}"]
}
}π₯ There are built-in default settings for C++, Python, Java, Go, Rust, JavaScript, TypeScript, Haskell, Ruby, Kotlin, and C#! Access them with Create runSettings.json command.
We can use VSCode's built-in variables which has the syntax of ${...} and will get resolved by the extension. ${defaultBuildTask} is not supported because it requires resolving the entire build configuration which is super slow!
π‘ Since runSettings.json applies recursively to subdirectories, you can specialize parts of the configuration within specific directories. The extension traverses from the workspace root directory up to the file folder, merging the settings along the way in that order.
Example structure:
workspace/
βββ runSettings.json # Base settings for entire workspace
βββ contests/
β βββ runSettings.json # Overrides for contests folder
β βββ codeforces/
β βββ runSettings.json # Overrides for codeforces folder
β βββ solution.cpp # Uses merged settings from all 3 files
Settings per language
compileCommand(optional): Command to run beforerunCommandwhen the file content changedrunCommand: Command to run the solutioncurrentWorkingDirectory(optional): sets the current working directory forrunCommand
Minimalistic UI from the old plugin have been reimagined to integrate VSCode's capabilities while maintaining the principle of maximum functionality within minimized space. The new UI experience is integrated into both Judge and Stress Tester views.
βΉοΈ You can mix languages! For example, you can have a C++ solution and a Python interactor. This automatically applies to stress tester as well!
- Run, edit, hide, skip testcases, you name it!
- Hidden optimizations such as batched IO, truncating huge IO, and cached compilations.
- Icons and tooltips to save space while being self-explanatory
- Dedicated popup for compiler errors with color support
- ... and so much more!
General setting for both Testcase Window and Stress Tester
maxDisplayCharacters: Maximum number of characters to display for each outputmaxDisplayLines: Maximum number of lines to display for each output
The extension typically attaches the debugger to an existing process, which allows custom inputs to be propagated to the program. However, each language has its own set of tooling. Adapt the commands as necessary!
π¨Please use ${debugPort} as the port for your debugging servers! The hand-picked port provides the following benefits:
- The port is free
- Detects when the debugging server fails to launch at the chosen port within a timeframe
- Frees the port when error occurs
We also have ${debugPid} for PID of the process for other debugging configurations without a server.
Additional language settings for debugging support
debugCommand: Command to start the solution under a debug serverdebugAttachConfig: Name oflaunch.jsonattach configuration.
Β©οΈ Example C++ configuration
I recommend Microsoft's official C/C++. CodeLLDB does not work because lldb-server cannot send real-time inputs.
-g flag to your compile command.
π Since both of them work with gdbserver, ensure that is installed, which is also what I tested with.
Here are the steps for Microsoft C/C++:
- Add these settings for
.cpp:
{
".cpp": {
// compile and run configurations from above...
"debugCommand": ["gdbserver", ":${debugPort}", "${fileDirname}/${fileBasenameNoExtension}"],
"debugAttachConfig": "GDB: Attach"
}
}- Create a GDB attach configuration in
.vscode/launch.json:
{
"configurations": [
{
"name": "GDB: Attach",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"MIMode": "gdb",
"miDebuggerServerAddress": "localhost:${debugPort}",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"cwd": "${workspaceFolder}"
}
]
}π Example Python configuration
I recommend Microsoft's official Python Debugger for the best experience. The extension has built-in support for debugpy, which is the de-facto Python debugging server.
π Ensure you have debugpy installed via pip.
Here are the steps for Python Debugger:
- Add these settings for
.py:
{
".py": {
// compile and run configurations from above...
"debugCommand": [
"python",
"-m",
"debugpy",
"--listen",
"${debugPort}",
"--wait-for-client",
"${file}"
],
"debugAttachConfig": "Python: Attach"
}
}- Create a
debugpyattach configuration in.vscode/launch.json:
{
"configurations": [
{
"name": "Python: Attach",
"type": "debugpy",
"request": "attach",
"connect": {
"port": "${debugPort}"
},
"justMyCode": true
}
]
}β¨οΈ Example Java configuration
I recommend Microsoft's official Debugger for Java for the best experience. For some reason, Oracle's Java extension ignores breakpoints.
-g flag to your compile command.
π Ensure you have Java Development Kit version 1.8+ installed.
Here are the steps for Debugger for Java:
- Add these settings for
.java:
{
".java": {
// compile and run configurations from above...
"debugCommand": [
"java",
"-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=${debugPort}",
"-cp",
"${fileDirname}",
"${fileBasenameNoExtension}"
],
"debugAttachConfig": "Java: Attach"
}
}- Create a Java attach configuration in
.vscode/launch.json:
{
"configurations": [
{
"name": "Java: Attach",
"type": "java",
"request": "attach",
"hostName": "localhost",
"port": "${debugPort}"
}
]
}We need both a file that outputs the correct solution and another that outputs a random input to both the current and correct solution. Additional information needs to be added to runSettings.json to tell the Stress Tester the names of these files. Here is the default example provided by the extension:
{
"generatorFile": "${fileDirname}/${fileBasenameNoExtension}__Generator${fileExtname}",
"goodSolutionFile": "${fileDirname}/${fileBasenameNoExtension}__Good${fileExtname}"
}β¨ The extension provides a 64-bit integer seed input for random number generators!
π‘TIP: To stress test for Runtime Error instead of Wrong Answer, have the good solution be the same as the one to bruteforce against!
![]() |
|---|
| Demo of stress testing A+B! |
Settings for Stress Tester
delayBetweenTestcases: Amount of delay between generated testcases in millisecondsstressTestcaseTimeLimit: Maximum time in milliseconds the Stress Tester is allowed to spend on one testcasestressTestcaseMemoryLimit: Maximum time in megabytes the Stress Tester is allowed to use on one testcasestressTimeLimit: Maximum time in milliseconds the Stress Tester is allowed to run
We need to tell the extension the name of our interactor file. Here is the default example provided by the extension:
{
"interactorFile": "${fileDirname}/${fileBasenameNoExtension}__Interactor${fileExtname}"
}β¨ The interactor becomes the judge during stress test in interactive mode!
Due to the lack of standardization of interactor's results, I have taken the middle ground of various online judges' interactor's behavior. The exit code of the interactor will be used to determine the acceptance of the solution. Below lists the exit codes and the verdict:
| Verdict | Code |
|---|---|
| β Accepted | 0 |
| β Wrong Answer | Non-zero |
| π₯ Runtime Error | OS Specific |
| π‘ Partial Points | Not Supported |
Interactive testcases have a special badge to make them distinguishable. If there is no set secret, the testcase will ask you to provide one. This is a multi-line textbox because you have to give all the data in one go!
![]() |
|---|
| The convenient workflow of running interactive testcases! |
![]() |
|---|
| Stress testing interactives is almost the same as regular stress testing! |
Competitive Companion is a widely recognized browser plugin to conveniently fetch problem inputs. The plugin works with wide range of online judges and is actively maintained. Native support has been integrated directly into the extension for optimal workflow.
![]() |
|---|
| Using Competitive Companion to parse a CodeForces problem |
![]() |
|---|
| We can parse an entire CodeForces Contest! |
Settings for Competitive Companion integration
automaticallyStartCompetitiveCompanion(default:true): Automatically start listening for Competitive Companion when VSCode startsopenSelectedFiles(default:true): Whether to open all the selected filesaskForWhichFile(default:false): Ask for which file to write testcase onto, even when a file is currently opened and only a single problem has been receivedincludePattern(default:**/*): Glob pattern to filter in the included files for asking promptexcludePattern(default: empty): Glob pattern to filter out the included files for asking promptport(default: 1327): Port number to listen from Competitive Companion
- Add the root directory of the templates to the settings
![]() |
|---|
| Adding a tree reroot DP template without switching files |
Possible settings
fileTemplatesBaseDirectory: Path to the base directory of all prewritten files (supports${...}). Defaults to workspace folder if not specifiedfileTemplatesDependencies(optional): Maps a template path relative to base directory to a list of other relative template paths that this one depends onfoldFileTemplate(default:false): Whether to fold the newly inserted prewritten code
- FastOlympicCoding: The original Sublime Text package that inspired this extension π
- Flaticon: Icon for this extension π








