DocumentationTroubleshooting
Reference
Troubleshooting
When something does not work, cstudy doctor usually says why and how to fix it. This page collects its common rows, the errors you are most likely to meet, and how to upgrade.
Start with cstudy doctor
Most problems show up in cstudy doctor. Run it inside your workspace: each line is ok, WARN (not blocking) or FAIL (blocks practice), followed by a fix: when one applies. Many fixes are cstudy doctor --fix, which writes missing template files and sets up the projects without touching your own files.
| Row | Status | Fix |
|---|---|---|
python/.venv missing | FAIL | cstudy doctor --fix |
typescript/node_modules | FAIL | cstudy doctor --fix |
workspace files | FAIL | cstudy doctor --fix writes the missing files |
runner runtime | FAIL | Missing or stale, typically after an upgrade: cstudy doctor --fix |
java | FAIL | Not version 21: install a JDK 21 and make it the default (JDK 21) |
go and rust files | WARN | A workspace created before Go and Rust: cstudy doctor --fix |
python debugpy | WARN | uv add --dev debugpy --directory python |
python pytest | WARN | uv add --dev pytest --directory python; only Python project problems need it |
project links | WARN | cstudy doctor --fix recreates the links |
rust linked projects | WARN | cstudy ide |
java project libraries | WARN | cstudy doctor --fix, online once |
python/.venv location | WARN | The workspace moved: rm -rf python/.venv && cstudy doctor --fix |
go, rustc, cargo | WARN | Only needed for --lang go and --lang rust; see Installation |
dlv, debugserver | WARN | Only needed for --debug in Go and Rust |
cstudy doctor exits 0 when nothing fails and 4 otherwise, so you can use it in scripts.
Common errors
| Message | What to do |
|---|---|
open a solution file in the editor first (got a directory: …) | IntelliJ passed the project directory because no editor had focus. Click into your solution file and run the configuration again |
not a solution file in this workspace: … | The path is not where cstudy writes solutions. Use the file cstudy start printed, or the slug |
go was not found on PATH | Install Go 1.24 or newer, or practise in another language. The same goes for cargo and Rust |
level 3 is locked; pass level 2 with cstudy test first | Pass the open levels before running a later one with --level |
cstudy hint is locked during the mock interview (…) | Hints and solutions unlock when the mock’s timer ends or every problem is done |
cannot debug python: port 5678 on 127.0.0.1 is already in use | Stop the other debug session, or choose another port with --debug-port |
no debugger listening on 127.0.0.1:5005 | With --debug-connect, start IntelliJ’s Debug JVM (listen) configuration first |
cannot debug go: dlv was not found | go install github.com/go-delve/delve/cmd/[email protected] |
cannot debug rust: debugserver was not found | xcode-select --install |
Commands that need a workspace exit with code 3 outside one and point you to cstudy init. Commands that act on the active attempt exit 3 when no attempt is in progress: start one, or name the problem.
Editor problems
- No Python interpreter in VS Code: run
cstudy doctor --fixsopython/.venvexists, then reload the window. - rust-analyzer reports an outdated toolchain, or flags
todo!andvec!: runrustup update. - A new Rust project problem is not analysed: run
cstudy ideto add it to rust-analyzer’s linked projects. - IntelliJ shows no JDK: accept its prompt to set up the SDK named
21, then Load Gradle Project. - Kotlin breakpoints never hit in VS Code: the Java debugger does not bind them. Debug Kotlin in IntelliJ IDEA.
- Your edited editor files were not updated:
cstudy idekeeps files you changed and names them;cstudy ide --forceoverwrites them.
Several installs of cstudy
When cstudy is installed more than once, say with Homebrew and with uv, the one that comes first on your PATH runs. List them and keep one:
which -a cstudy
cstudy --versionUpgrading
Upgrade with the tool you installed with, then refresh each workspace:
brew upgrade cstudy # or: uv tool upgrade coding-study / pipx upgrade coding-study
cd ~/cstudy-workspace
cstudy export # optional: a backup of your progress
cstudy doctor --fix # refreshes the runner runtime, adds new template files
cstudy ide # brings the editor files up to datecstudy doctor --fix never overwrites a file you have. Problems added in a new release join the catalog on their own. If a new catalog problem uses the slug of one of your own problems, yours keeps winning.
On a new machine
Clone your workspace, install cstudy and the toolchains, run cstudy doctor --fix in the workspace, then cstudy import to restore the progress you exported.
Release notes are in the changelog.
Written for cstudy 0.8.0. The specs in the cstudy repository are the source of truth for every detail.