Files
Charon/docs/debugging-local-container.md
GitHub Actions 3169b05156 fix: skip incomplete system log viewer tests
- Marked 12 tests as skip pending feature implementation
- Features tracked in GitHub issue #686 (system log viewer feature completion)
- Tests cover sorting by timestamp/level/method/URI/status, pagination controls, filtering by text/level, download functionality
- Unblocks Phase 2 at 91.7% pass rate to proceed to Phase 3 security enforcement validation
- TODO comments in code reference GitHub #686 for feature completion tracking
- Tests skipped: Pagination (3), Search/Filter (2), Download (2), Sorting (1), Log Display (4)
2026-02-09 21:55:55 +00:00

32 lines
1.3 KiB
Markdown

---
title: Debugging the Local Docker Image
description: Developer guide for attaching VS Code debuggers to Charon running in Docker containers.
---
## Debugging the Local Docker Image
Use the `charon:local` image as the source of truth and attach VS Code debuggers directly to the running container. Backwards-compatibility: `cpmp:local` still works (fallback).
### 1. Enable the debugger
The image now ships with the Delve debugger. When you start the container, set `CHARON_DEBUG=1` (and optionally `CHARON_DEBUG_PORT`) to enable Delve. For backward compatibility you may still use `CPMP_DEBUG`/`CPMP_DEBUG_PORT`.
```bash
docker run --rm -it \
--name charon-debug \
-p 8080:8080 \
-p 2345:2345 \
-e CHARON_ENV=development \
-e CHARON_DEBUG=1 \
charon:local
```
Delve will listen on `localhost:2345`, while the UI remains available at `http://localhost:8080`.
## 2. Attach VS Code
- Use the **Attach to Charon backend** configuration in `.vscode/launch.json` to connect the Go debugger to Delve.
- Use the **Open Charon frontend** configuration to launch Chrome against the management UI.
These launch configurations assume the ports above are exposed. If you need a different port, set `CHARON_DEBUG_PORT` (or `CPMP_DEBUG_PORT` for backward compatibility) when running the container and update the Go configuration's `port` field accordingly.