Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>foo — BOJ workspaceNew to Visual Studio Code? Get it now.
foo — BOJ workspace

foo — BOJ workspace

Andrew Kim

|
1 install
| (0) | Free
Sidebar and buttons for the foo Baekjoon Online Judge CLI.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

foo for VS Code — BOJ Helper

Less setup. More solving.

English · 한국어

A VS Code extension that puts a GUI on foo, a Rust CLI for Baekjoon Online Judge (BOJ). Browse your workbooks, move between problems, run local test cases, and upload solutions to GitHub without leaving the editor.

Installation guide

You need VS Code 1.100 or later, the foo CLI, and a compiler or interpreter for your language. The extension doesn't include foo or any compiler.

1. Install a compiler or interpreter

Language What to install
C, C++ LLVM Clang and your platform's linker and libraries (on Windows, the C++ tools of Visual Studio Build Tools). MSVC itself is not accepted as the compiler.
Python Python 3
Java JDK 21 or later
Others See foo's language table.

2. Install the foo CLI

Install stable Rust with rustup, open a new terminal, and run:

cargo install --git https://github.com/onecu-21/foo --locked
foo --version

To update foo later, run the cargo install command again.

3. Install the extension

In VS Code, open the Extensions view (Ctrl+Shift+X, or Cmd+Shift+X on macOS), search for AndrewKim.foo-vscode, and press Install. You can also open it in the Marketplace or run:

code --install-extension AndrewKim.foo-vscode

4. Set up

  1. Restart VS Code so it sees the newly installed tools.
  2. Open the foo view in the activity bar and press the gear button.
  3. Choose your default language and a workspace folder, then save. This replaces running foo init in a terminal. Leave the compiler and VS Code paths empty to auto-detect them.
  4. Press Add to register a workbook, then Start.

Troubleshooting

Problem What to do
foo is not found Restart VS Code. If it still fails, set foo.executablePath to the full path, usually .cargo/bin/foo in your home folder (.cargo\bin\foo.exe on Windows). Write the path out without ~ or %USERPROFILE%.
Compiler or runtime was not found Add it to PATH and restart VS Code, or choose its executable in the settings screen.
F5 shows no output Check that your program prints something; a new problem starts from an empty template. If an earlier run is still waiting for input in the terminal, close that terminal and try again.

Workbooks and solving

BOJ prohibits scraping, so neither foo nor this extension fetches its pages. Press Add and either import a workbook or step page you saved yourself in your browser, or enter a title and the problem numbers.

Where What it does
Tree Lists your workbooks and problems. Clicking a problem opens its page in your browser and its folder in VS Code, and activates its workbook.
Start / Previous / Next Opens the current, previous, or next problem of the active workbook.
Checkbox Your own note that a problem was accepted on BOJ. The extension can't check BOJ.
Status bar Shows 2557 · 1/13 · C++. Click it for a menu of commands, including opening a problem by number.
Gear Changes foo's default language, workspace folder, compiler, and VS Code path, and links to the extension settings.

The language list shows what your installed foo supports.

Running and copying your code

In a problem folder, F5 saves your files, copies the problem's source code to the clipboard, and builds and runs it, so you can paste it straight into BOJ's submit form. Set foo.copyOnF5 to false to keep your clipboard untouched. While a debug session is paused, F5 continues as usual.

Local tests

Test cases are pairs of <name>.in and <name>.out (or .ans) files in the problem's tests/ folder.

  • Add test case creates an empty pair to paste into.
  • Import samples reads the samples and title from a problem page you saved as HTML.
  • Run tests reports AC, WA, TLE, or ERR (compile or runtime error) for each case. Each case builds the program again, so the time limit includes build time.
Setting Default Meaning
foo.test.directory tests Test case folder inside the problem folder.
foo.test.timeoutMs 10000 Time limit per case, including the build.
foo.test.compare lenient lenient ignores trailing spaces and blank lines. Also exact, tokens, and float.
foo.test.floatTolerance 0.000001 Allowed absolute or relative error in float mode.
foo.test.stopOnFirstFailure false Stops at the first case that doesn't pass.
foo.test.revealOutput onFailure When to show the output panel: onFailure, always, or never.

Upload to GitHub

Press the GitHub button on a problem. By default the extension signs in with VS Code's GitHub account, asks for the repository (owner/name), creates it as private if it doesn't exist, and asks you to confirm before committing. Set foo.github.method to git to commit into a local clone with your own git credentials instead.

Setting (foo.github.…) Default Meaning
method api api (GitHub API) or git (local clone).
repository, branch empty Target for api. An empty branch means the default branch.
createIfMissing, visibility true, private Creating a missing repository (api).
localPath, push empty, true The local clone, and whether to push after committing (git).
directoryTemplate {lang}/{id} Folder for each problem.
commitMessageTemplate [{langLabel}] BOJ {id} Commit message.
readmeTemplate see Settings README written into each problem folder.
include source, readme What to upload: source, tests, readme.
trigger manual Or upload after onTestsPass or onMarkSolved.
requireTestsPass false Uploads only problems that passed local tests.
confirmBeforeUpload true Shows the files and commit message first.
onExisting overwrite For an existing source file: overwrite, skip, or rename.
updateIndex, indexFile true, README.md Keeps a table of solved problems in the repository.
openAfterUpload false Opens the commit in the browser.

Templates accept {id}, {title}, {lang}, {langLabel}, {ext}, {source}, {workbook}, {index}, {index3}, {url}, {result}, and {date}.

Other settings

Setting Default Meaning
foo.executablePath foo The foo executable.
foo.openBrowser true Opens the problem page when moving to a problem.
foo.openFolderIn currentWindow Or newWindow.
foo.copyOnF5 true Copies the source code when you press F5.

Files

Workbooks, positions, and foo's settings stay in foo's own config.toml and state.toml; the extension only changes them through the CLI, so the terminal and the extension stay in step. Test results, accepted marks, and problem titles are stored in VS Code, not in your problem folders.

Development

npm run typecheck
npm test            # Node 23.6 or later
npm run build       # or: npm run watch
npm run package     # creates the .vsix

Press F5 in this repository to launch an Extension Development Host. Login, automatic submission, and fetching BOJ pages are out of scope.

License

Licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft