1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
---
name: debug-panel-and-logs
description: How to use the debug panel, session logging, and terminal diagnostics
tags: [debug, logging, diagnostics, troubleshooting]
category: system
---
## Steps
1. **Toggle debug panel:**
- debug — opens real-time debug panel showing last AI tool call, response time, and context
- Debug panel includes Copy, Export, and Write to VFS buttons
- Export: saves tool call log as timestamped JSON to downloads
- Write to VFS: appends debug data to /debug.log (dedup by turn ID)
2. **Session logging:**
- logs [n] [LEVEL] — view last n log entries (optionally filtered by INFO/WARN/ERROR)
- logrotate — rotate current.log to dated archive (auto-cleans old logs beyond 10)
- Logs stored in /logs/ directory: current.log + dated archives
- Health check runs automatically after complex tasks
3. **Diagnostic commands:**
- health-check — full audit: VFS size, modules, logs, trash, skills
- check — quick system health including module requirement status
- mem — real-time memory usage (also in header)
- status — network, files, modules, Ollama connectivity
4. **System journals:**
- debug.log — appended by debug panel VFS button (dedup by turn ID)
- current.log — system activity log with rotation
- Auto-save: terminal state auto-saves every 60s
5. **When to use:**
- AI is behaving unexpectedly → debug to see tool calls
- User reports errors → logs 50 ERROR to see error entries
- Memory concerns → mem to check, health-check for full audit
|