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 to aid your debugging
- 👜 Insert file templates without leaving your code
- 🛜 Support for Competitive Companion for efficient problem gathering
- ⚡ BLAZINGLY FAST! Asynchronous design + optimizations = 99% spam proof!
📥 Install within Visual Studio Code or at Visual Studio Marketplace
Provide run settings for the languages you use in settings.json. Here are some examples for C++, Python, and Java:
{
"fastolympiccoding.runSettings": {
".cpp": {
"compileCommand": "g++ ${path:${file}} -o ${path:${fileDirname}/${fileBasenameNoExtension}${exeExtname}}",
"runCommand": "${path:${fileDirname}/${fileBasenameNoExtension}${exeExtname}}"
},
".py": {
"runCommand": "python ${path:${file}}"
},
".java": {
"compileCommand": "javac ${path:${file}}",
"runCommand": "java -cp ${fileDirname} ${fileBasenameNoExtension}"
}
}
}We can use the following variables in the syntax of ${...}
- Most of VSCode's built-in variables
${exeExtname}returns.exefor Windows and an empty string for other platforms${path:*value*}normalizes *value* into a valid path string for the current platform
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
The UI adapts to VSCode's theme, font family and font size. Minimalism from the old plugin has been improved with VSCode Codicons and the native look of VSCode. The new UI experience is integrated into both Judge and Stress Tester windows.
- Run, edit, hide, skip testcases, you name it!
- Hidden optimizations such as batched IO, truncating huge IO, and cached compilations.
- 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 operating system allocated the port to ensure it is available
- Detects when the debugging server fails to launch at the chosen port within a timeframe
- Frees the port when error occurs
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 either Microsoft's official C/C++ or Native Debug. CodeLLDB does not work because lldb-server cannot send real-time inputs.
C++ (and other compiled languages) requires debug symbols to be compiled in! Easiest way is to add -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 Native Debug, which should be very similar with Microsoft C/C++:
- Add these settings for
.cpp:
{
"fastolympiccoding.runSettings": {
".cpp": {
// compile and run configurations from above...
"debugCommand": "gdbserver :${debugPort} ${path:${fileDirname}/${fileBasenameNoExtension}${exeExtname}}",
"debugAttachConfig": "GDB: Attach"
}
}
}- Create a GDB attach configuration in
.vscode/launch.json:
{
"configurations": [
{
"name": "GDB: Attach",
"type": "gdb",
"request": "attach",
"executable": "${path:${fileDirname}/${fileBasenameNoExtension}${exeExtname}}",
"target": ":${debugPort}",
"remote": true,
"cwd": "${workspaceRoot}",
"valuesFormatting": "prettyPrinters"
}
]
}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:
{
"fastolympiccoding.runSettings": {
".py": {
// compile and run configurations from above...
"debugCommand": "python -m debugpy --listen ${debugPort} --wait-for-client ${path:${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.
Compile your Java files with debug symbols! Add -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:
{
"fastolympiccoding.runSettings": {
".java": {
// compile and run configurations from above...
"debugCommand": "java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=${debugPort} -cp ${path:${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}"
}
]
}Required files (naming scheme can be configured in settings):
-
<name>.[ext]: the solution to bruteforce against -
<name>__Good.[ext]: the solution that outputs the correct answer -
<name>__Generator.[ext]: to generate inputs for the other 2 files- 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!
![]() |
|---|
| Stress Tester was able to find a counterexample due to an integer overflow bug! |
Settings for Stress Tester
goodSolutionFile: Full path for good solution file (supports${...})generatorFile: Full path for generator file (supports${...})delayBetweenTestcases: Amount of delay between generated testcases in milliseconds (minimum:5)stressTestcaseTimeLimit: Maximum time in milliseconds the Stress Tester is allowed to spend on one testcase (0for no limit)stressTestcaseMemoryLimit: Maximum time in megabytes the Stress Tester is allowed to use on one testcase (0for no limit)stressTimeLimit: Maximum time in milliseconds the Stress Tester is allowed to run (0for no limit)
- Add the root directory of the templates to the settings
- NOTE: Remove trailing newlines for fold to work (folding is optional via settings)
- Folding depends on VSCode support, which may require other extensions depending on the language.
![]() |
|---|
| Adding a tree reroot DP template without switching files |
Possible settings
fileTemplatesBaseDirectory: Full path to the base directory of all prewritten files (supports${...})fileTemplatesDependencies(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
![]() |
|---|
| 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
- FastOlympicCoding: The original Sublime Text package that inspired this extension 💖
- Flaticon: Icon for this extension 💖






