AI / GitHub Copilot CLI Fundamentals Interview Questions
What logging and diagnostic capabilities does GitHub Copilot CLI provide?
Copilot CLI provides several mechanisms for understanding what is happening during a session - from verbose logging to dry-run previews - useful for debugging, auditing, and understanding agent behaviour.
# Enable verbose/debug logging copilot --log-level debug # Write logs to a file copilot --log-file ./copilot-debug.log # Non-interactive with logging copilot -p "explain this code" --log-level debug -s # Check version and build info copilot --version # Use /chronicle for session-level history and insights /chronicle "Show me everything Copilot did in the last session" "What tools did Copilot use during this session?"
| Option | Purpose |
|---|---|
| --log-level debug | Verbose output showing tool calls, API requests, decision logic |
| --log-file | Write log output to a file instead of (or in addition to) stdout |
| --version | Print the installed Copilot CLI version |
| /chronicle | Query past sessions, view what was done, get usage patterns |
| copilot -p ... -s | Non-interactive with clean output - useful for scripted diagnostics |
Debug logging is particularly useful when Copilot CLI is not behaving as expected - it shows what tools were called, what inputs they received, and what the model decided at each step, giving full visibility into the agent's reasoning loop.
More Related questions...