Diagnostics
Diagnostics are the tools and habits you use to understand what Vix is doing.
Use this guide when a command fails, a build is slower than expected, a dependency is missing, a server does not start, a production deployment behaves incorrectly, or you need to explain what happened.
The idea
Vix is designed to make failures visible.
A good diagnostic workflow should answer:
What command ran?
What did Vix detect?
What changed?
What failed?
What should I run next?Diagnostics are not only for errors. They also help you understand build state, caches, dependency state, environment configuration, runtime behavior, production health, and logs.
Start with the right command
Use this map first:
| Problem | Start with |
|---|---|
| Environment or tools look broken | vix doctor |
| You need paths, cache state, registry state, or package state | vix info |
| Build failed or rebuilt unexpectedly | vix build --explain |
| Tests fail | vix tests or vix check --tests |
| Runtime behavior is hard to reproduce | vix run --replay then vix replay |
| Environment variables may be wrong | vix env check |
| Production service is unhealthy | vix health |
| Production logs are needed | vix logs |
| WebSocket endpoint is suspicious | vix ws check |
| Database state is suspicious | vix db status |
Basic diagnostic flow
A good local debugging flow is:
vix doctor
vix info
vix build --explain
vix check --testsFor a runtime issue:
vix run --replay
vix replay show last
vix replay lastFor a production issue:
vix health
vix logs --errors
vix service status
vix proxy nginx checkEnvironment diagnostics
Use vix doctor when you want to check whether your machine is ready for Vix.
vix doctorUse online checks when you want to verify release information:
vix doctor --onlineUse JSON output for scripts or CI:
vix doctor --json
vix doctor --json --onlineTypical things to diagnose with vix doctor:
Vix CLI installation
compiler availability
CMake availability
Ninja availability
Git availability
required tools
upgrade readiness
latest release informationInspect Vix local state
Use vix info when you want to see where Vix stores things.
vix infoThis can show:
Vix version
Vix root
registry path
store path
global package manifest
artifact cache path
store size
artifact cache size
package counts
cache stateUse it before cleanup commands:
vix info
vix store gc --dry-runUse it to inspect a project dependency:
vix info softadastra/jsonUse it to inspect a global package:
vix info -g softadastra/jsonBuild diagnostics
Use --explain when a build rebuilds unexpectedly or when you want to understand why Vix chose a path.
vix build --explainFor a specific target:
vix build --build-target vix --explainUseful cases:
source file changed
header file changed
CMakeLists.txt changed
compiler flags changed
target changed
artifact cache hit
artifact cache miss
fallback to Ninja
target is already up to dateExample output shape:
Rebuilding BuildCommand.cpp
reason: source file changed
Relinking vix
reason: object file changedWhen Vix cannot prove the exact dependency relationship, it should not lie. It should fall back safely.
Example shape:
Project input changed
reason: dependency changed, delegating target to Ninja
Relinking vix
reason: target may depend on changed inputFast build diagnostics
For no-op target builds, check whether Vix can return early safely:
vix build --build-target vixExpected shape when clean:
Checking vix (dev)
✔ Up to date in 0.3sIf the output is missing, Vix must rebuild or restore from cache.
rm -f build-ninja/vix
vix build --build-target vixA state hit alone is not enough. The output must still be valid.
Cache diagnostics
Vix has multiple cache layers.
BuildState -> fast no-op validation
ArtifactCache -> final binary or package restore
BuildGraph -> target-aware analysis
ObjectCache -> compile output reuse
CMake/Ninja -> compatibility fallbackUse vix info to inspect cache locations:
vix infoUse store commands for package store diagnostics:
vix store path
vix store gc --dry-runUse build explanations for build-cache behavior:
vix build --explainUse verbose build output when you need more details:
vix build -vDependency diagnostics
When packages are not found, start with the registry:
vix registry syncThen inspect dependencies:
vix list
vix outdatedIf local dependency state is broken:
vix resetIf you only need locked installs:
vix installUse this flow:
vix registry sync
vix install
vix list
vix check --testsRegistry diagnostics
Use:
vix registry pathto see where the local registry index is stored.
Use:
vix registry syncto refresh it.
Use:
vix search jsonto confirm the registry index is usable.
If vix add, vix update, vix outdated, or vix publish cannot find package metadata, run:
vix registry syncRuntime diagnostics
Use replay when runtime behavior must be reproduced.
Record a run:
vix run api --replayInspect the latest run:
vix replay show lastReplay it:
vix replay lastReplay the latest failed run:
vix replay failedReplay with debug logging:
vix replay failed --env VIX_LOG_LEVEL=debugThis is useful when the problem depends on runtime arguments, environment, current directory, or the exact executable path.
Runtime arguments diagnostics
If your app did not receive arguments, check the separator.
Wrong:
vix run main.cpp --name GaspardCorrect:
vix run main.cpp -- --name GaspardEverything after -- is passed to your app.
For replay:
vix replay last -- --debugEnvironment variable diagnostics
Use:
vix env checkFor production requirements:
vix env check --productionShow values safely:
vix env check --production --show-valuesSecrets are masked.
Use this when:
.env is missing
.env.example is incomplete
production required variables are missing
systemd environment does not match expected variables
configuration differs between local and productionLogging diagnostics
For local runtime logging, use environment variables such as:
VIX_LOG_LEVEL=debug
VIX_LOG_FORMAT=kvFor one execution:
VIX_LOG_LEVEL=debug vix runFor replay:
vix replay failed --env VIX_LOG_LEVEL=debugFor production logs:
vix logs
vix logs app
vix logs proxy
vix logs errorsFollow logs:
vix logs app -fShow recent errors:
vix logs errors --lines 100Production diagnostics
For production, start with health:
vix healthCheck only the local application endpoint:
vix health localCheck the public endpoint:
vix health publicCheck WebSocket:
vix health websocketThen inspect logs:
vix logs --errorsThen inspect service state:
vix service statusThen inspect proxy state:
vix proxy nginx checkA practical production flow:
vix health
vix logs errors --lines 100
vix service status
vix proxy nginx checkWebSocket diagnostics
Use:
vix ws checkUse a specific URL when needed:
vix ws check --url ws://127.0.0.1:9090/wsUse ping when supported:
vix ws check --pingUse verbose output:
vix ws check --verboseThis helps diagnose:
wrong WebSocket path
wrong port
proxy upgrade headers
timeout
public URL mismatch
local URL mismatch
heartbeat behaviorProxy diagnostics
Check the installed Nginx proxy config:
vix proxy nginx checkValidate and reload Nginx:
vix proxy nginx reloadInstall generated config:
vix proxy nginx initIssue or renew a certificate:
vix proxy nginx certbotIf the public endpoint fails but local health passes, check the proxy:
vix health local
vix health public
vix proxy nginx check
vix logs proxyService diagnostics
Use service diagnostics when the app is managed by systemd.
vix service statusRestart the service:
vix service restartFollow logs:
vix logs app -fIf deployment restarted the service but the app is not healthy:
vix service status
vix logs app --lines 100
vix health localDatabase diagnostics
Use:
vix db statusThis checks database configuration and local SQLite state.
Use migrations:
vix db migrateBack up SQLite:
vix db backupFor ORM migration status:
vix orm status --db blog_db --dir ./migrationsUse this when:
database file is missing
storage directory is missing
storage is not writable
WAL or SHM files are unexpected
migrations directory is missing
migration state is unclearDeployment diagnostics
Before deployment:
vix env check --production
vix check --tests
vix build --preset releaseDuring deployment, use dry run:
vix deploy --dry-runVerbose deployment:
vix deploy --verboseIf deployment fails:
vix logs errors --lines 100
vix service status
vix healthIf deployment should not pull or run tests:
vix deploy --no-pull
vix deploy --no-testsTest diagnostics
Run tests:
vix testsFail fast:
vix tests --fail-fastRun validation with tests:
vix check --testsFor release validation:
vix build --preset release
vix tests --preset releaseFormatting diagnostics
Check formatting without modifying files:
vix fmt --checkFormat the project:
vix fmtIf generated files are not formatted:
vix make class User --in src/domain
vix fmtCleanup diagnostics
If local generated state is broken, clean project state:
vix cleanThen reinstall:
vix installOr use one command:
vix resetUse vix clean for local project state.
Use vix store for global package store cleanup.
Use vix info before deleting global data.
Common workflows
Diagnose a broken local setup
vix doctor
vix info
vix registry sync
vix install
vix check --testsDiagnose a strange build
vix build --explain
vix build --build-target vix --explain
vix infoDiagnose missing dependencies
vix registry sync
vix install
vix list
vix check --testsDiagnose a runtime failure
vix run api --replay
vix replay show failed
vix replay failed
vix replay failed --env VIX_LOG_LEVEL=debugDiagnose production failure
vix health
vix logs errors --lines 100
vix service status
vix proxy nginx checkDiagnose WebSocket failure
vix health websocket
vix ws check --verbose
vix logs proxy --lines 100Diagnose deployment safely
vix env check --production
vix deploy --dry-run
vix deploy --verbose
vix healthCommon mistakes
Running random cleanup first
Wrong:
rm -rf ~/.vixBetter:
vix info
vix doctor
vix store gc --dry-runDo not delete global state before understanding what is broken.
Using vix clean for global cache problems
vix clean only affects the current project.
Use:
vix info
vix store path
vix store gc --dry-runfor global package store diagnostics.
Forgetting to sync the registry
If packages cannot be found:
vix registry syncThen retry:
vix add namespace/name
vix installForgetting --replay
Wrong:
vix run api
vix replay failedCorrect:
vix run api --replay
vix replay failedReplay records are created only when recording is enabled.
Debugging production without checking local health
Check local first:
vix health localThen public:
vix health publicIf local works but public fails, the issue is likely proxy, TLS, DNS, firewall, or public routing.
Passing app arguments without --
Wrong:
vix run main.cpp --debugCorrect:
vix run main.cpp -- --debugRecommended diagnostic order
Use this order when you are not sure where the problem is:
vix doctor
vix info
vix env check
vix registry sync
vix install
vix build --explain
vix check --testsFor runtime:
vix run --replay
vix replay show last
vix replay lastFor production:
vix env check --production
vix health
vix logs errors --lines 100
vix service status
vix proxy nginx checkRelated commands
| Command | Purpose |
|---|---|
vix doctor | Check environment health |
vix info | Show paths, caches, and local state |
vix build --explain | Explain build decisions |
vix check | Validate project health |
vix tests | Run tests |
vix replay | Reproduce recorded runs |
vix env | Check environment files |
vix health | Check local, public, and WebSocket health |
vix logs | Read app, proxy, and error logs |
vix ws | Check WebSocket endpoint |
vix service | Manage systemd service |
vix proxy | Manage Nginx proxy |
vix db | Check, migrate, and back up database state |
What you should remember
Start with information before cleanup:
vix doctor
vix infoUse explanations for builds:
vix build --explainUse replay for runtime failures:
vix run api --replay
vix replay failedUse health and logs for production:
vix health
vix logs errors --lines 100Use environment checks when configuration may be wrong:
vix env check --productionThe best diagnostic flow is simple:
inspect first
explain what changed
reproduce the failure
then fixNext step
Continue with production deployment.