-
Notifications
You must be signed in to change notification settings - Fork 2
Debug Logging
Debug logging creates an exhaustive diagnostic log for troubleshooting prototype sessions. It captures full AI call payloads, state mutations, decision branches, slash commands, and error tracebacks.
The log is designed to be read by anyone -- developers, testers, or end-users -- without needing to reproduce the issue.
Set the DEBUG_PROTOTYPE environment variable to true before running any prototype command:
# Windows (PowerShell)
$env:DEBUG_PROTOTYPE = "true"
az prototype design --artifacts ../artifacts/
# Windows (cmd)
set DEBUG_PROTOTYPE=true
az prototype design --artifacts ../artifacts/
# Linux / macOS
DEBUG_PROTOTYPE=true az prototype design --artifacts ../artifacts/The log file is created in the project directory with the name:
debug_YYYYMMDDHHMMSS.log
Where YYYYMMDDHHMMSS is the timestamp when the session started. Example: debug_20260325143045.log.
Logged once at the beginning of a session with environment and configuration context:
2026-03-25 14:30:45 | SESSION_START
Python: 3.12.10
OS: Windows 10.0.26100 (AMD64)
Extension: 0.2.1b6
Project: C:\Users\joshua\projects\testing
AI Provider: copilot (claude-sonnet-4.5)
Timeout: 480s
IaC Tool: terraform
Every AI call is logged with full payload details:
2026-03-25 14:30:52 | AI_CALL DiscoverySession._chat
System messages: 5 msgs, 69,234 chars
History messages: 4 msgs, 12,891 chars
User message: 2,340 chars
Total payload: 84,465 chars
Model: claude-sonnet-4.5, Temperature: 0.5, Max tokens: 8192
--- USER MESSAGE ---
The user answered about **Authentication**: Use Stytch for...
--- END USER MESSAGE ---
2026-03-25 14:31:18 | AI_RESPONSE DiscoverySession._chat
Elapsed: 26.3s
Response: 1,847 chars
Tokens: prompt=21450 completion=892 total=22342
--- RESPONSE ---
Yes
--- END RESPONSE ---
State mutations are logged with the operation and details:
2026-03-25 14:31:18 | STATE mark_item
heading=Authentication & Identity
status=answered
exchange=4
2026-03-25 14:31:18 | STATE save
path=.prototype/state/discovery.yaml
items=16
exchanges=4
inventory_files=8
Decision branches and control flow transitions:
2026-03-25 14:30:49 | FLOW DiscoverySession.run
Entry
has_items=True
item_count=16
pending=13
seed_context_len=35
artifacts_len=0
context_only=True
Slash commands (not counted as AI exchanges):
2026-03-25 14:32:10 | COMMAND
command=/status
topic=Authentication & Identity
real_answers=0
Errors with full Python tracebacks:
2026-03-25 14:35:00 | ERROR CopilotProvider.chat
exception=CLIError: Copilot API timed out after 480s.
elapsed_s=480.1
timeout=480
--- TRACEBACK ---
Traceback (most recent call last):
...
--- END TRACEBACK ---
The debug log may contain:
- Project configuration details (provider, model, IaC tool)
- Discovery conversation content (user input and AI responses)
- File paths and artifact names
- Token counts and timing information
It does not contain:
- API keys or secrets (these are in
prototype.secrets.yaml, not logged) - Full governance policy content (only sizes are logged)
- Azure subscription IDs or credentials
When sharing log files for support, review the content and redact any sensitive project information if needed.
- Troubleshooting -- common issues and diagnostic commands
- AI Providers -- provider configuration and timeout settings
Getting Started
Stages
Interfaces
Configuration
Agent System
Features
- Backlog Generation
- Cost Analysis
- Error Analysis
- Docs & Spec Kit
- MCP Integration
- Knowledge System
- Escalation
Quality
Help
Policies — Azure
AI Services
Compute
Data Services
- Azure SQL
- Backup Vault
- Cosmos Db
- Data Factory
- Databricks
- Event Grid
- Event Hubs
- Fabric
- IoT Hub
- Mysql Flexible
- Postgresql Flexible
- Recovery Services
- Redis Cache
- Service Bus
- Stream Analytics
- Synapse Workspace
Identity
Management
Messaging
Monitoring
Networking
- Application Gateway
- Bastion
- CDN
- DDoS Protection
- DNS Zones
- Expressroute
- Firewall
- Load Balancer
- Nat Gateway
- Network Interface
- Private Endpoints
- Public Ip
- Route Tables
- Traffic Manager
- Virtual Network
- Vpn Gateway
- WAF Policy
Security
Storage
Web & App
Policies — Well-Architected
Reliability
Security
Cost Optimization
Operational Excellence
Performance Efficiency
Integration