Overview
This guide covers advanced debugging techniques for diagnosing issues with Antigravity Manager, including log analysis, debug console usage, and diagnostic commands.Log System
Log File Locations
Logs are stored in the data directory and rotated daily: macOS and Linux:Log Rotation and Cleanup
From the source code (
modules/logger.rs:88-186), logs are automatically managed:- Daily rotation: New log file created each day
- Age-based cleanup: Logs older than 7 days are deleted
- Size-based cleanup: If logs exceed 1GB, oldest files are deleted until below 512MB
- Max total size: 1GB
- Target size after cleanup: 512MB
- Retention period: 7 days
- Cleanup runs: On application startup
Log Levels
Logs use different levels to categorize messages:- ERROR: Critical errors that need immediate attention
- WARN: Warning messages about potential issues
- INFO: General informational messages (default level)
- DEBUG: Detailed debugging information
- TRACE: Very detailed trace information
Reading and Analyzing Logs
Real-time Log Monitoring
Monitor logs as they’re written:Common Log Patterns
Account disabled due to invalid_grant
Account disabled due to invalid_grant
Log pattern:What it means:
- The refresh token has been revoked or expired
- Account needs re-authorization
- Delete and re-add the account via OAuth
- See Account Errors
403 Forbidden - Account marked as forbidden
403 Forbidden - Account marked as forbidden
Log pattern:What it means:
- Account has been blocked or lacks permissions
- Automatically removed from active pool
- Check account details for verification links
- See Account Errors
VALIDATION_REQUIRED temporary block
VALIDATION_REQUIRED temporary block
Log pattern:What it means:
- Google requires additional verification
- Account automatically blocked for 10 minutes
- System will retry after the block expires
- Wait for automatic retry, or
- Complete verification if link is provided
Token refresh success/failure
Token refresh success/failure
Success pattern:Failure pattern:What it means:
- Background token refresh occurred
- Indicates token health
- Success: No action needed
- Failure: Check for
invalid_granterrors
Quota fetch and sync
Quota fetch and sync
Log pattern:What it means:
- Periodic quota refresh from Google API
- Shows current quota percentages
- Monitor for quota depletion
- Enable quota protection if needed
Proxy pool errors
Proxy pool errors
Log pattern:What it means:
- Proxy connection failed
- System falling back to direct connection or next proxy
- Verify proxy credentials and connectivity
- Check proxy pool health check results
Log Analysis Commands
Count errors by type:Debug Console
Accessing Debug Console
Desktop Application:- Navigate to Settings → About
- Click “Debug Console” button
- Console opens in a new section
- Debug console is automatically available in the interface
- Logs refresh every 2 seconds via polling
Using Debug Console
The Debug Console provides real-time visibility into:
- HTTP requests and responses
- Account selection and rotation
- Token refresh operations
- Error details and stack traces
- Request method, URL, and headers
- Response status codes and timing
- Account used for each request
- Model mapping and routing decisions
- Thinking mode activation
- Tool call parameters
- Real-time log streaming
- Filter by log level (ERROR, WARN, INFO, DEBUG)
- Search within logs
- Auto-scroll toggle
- Copy logs to clipboard
- Clear console
Debugging Mode Toggle
Enable detailed logging:- Settings → About → Debug Console
- Toggle “Enable Debug Mode”
- Logs will include:
- Full request/response bodies
- Detailed error stack traces
- Internal state changes
Diagnostic Commands
System Information
Check application version:Network Diagnostics
Test proxy service:Database Diagnostics
Account database:Advanced Debugging Techniques
Request Tracing
Enable request tracing:- Full request body (including messages, parameters)
- Model mapping decisions
- Account selection logic
- Token refresh attempts
- Response transformation
- Streaming chunk details
Memory and Performance
Monitor resource usage:- Monitor over extended period
- Look for continuously increasing memory usage
- Normal: Memory stabilizes after initial requests
- Issue: Memory grows unbounded over hours
Network Traffic Analysis
Capture HTTP traffic:Troubleshooting Scenarios
Requests are slow or timing out
Requests are slow or timing out
Diagnostic steps:
-
Check logs for retry patterns:
-
Monitor network latency:
-
Check account rotation:
- Slow rotation may indicate all accounts are rate-limited
- Look for “Too Many Requests (429)” in logs
-
Verify quota protection settings:
- Settings → Quota Protection
- If enabled, requests may be blocked when quota is low
Accounts keep getting disabled
Accounts keep getting disabled
Diagnostic steps:
-
Check disable reasons:
-
Look for common patterns:
-
Verify OAuth tokens are valid:
-
Test manual token refresh:
- Use UI to refresh specific account
- Check logs for refresh errors
Proxy pool not working
Proxy pool not working
Diagnostic steps:
-
Check proxy pool configuration:
-
Test proxy connectivity:
-
Check proxy health status:
- Settings → Proxy Pool
- Look for unhealthy proxies
- Review health check logs
-
Monitor proxy usage in logs:
Model mapping not working
Model mapping not working
Diagnostic steps:
-
Verify model override configuration:
-
Check debug console for mapping decisions:
- Enable Debug Console
- Look for “Model mapped from X to Y” messages
-
Test with specific model:
-
Review model config:
- Settings → Model Router
- Ensure mappings are saved
- Check for conflicting rules
Reporting Issues
When reporting issues on GitHub, include:Essential Information
-
Application version:
- Settings → About → Version number
-
Operating system:
- macOS version / Linux distribution / Windows version
-
Deployment method:
- Desktop app / Docker / Headless
-
Relevant logs:
-
Configuration (sanitized):
-
Steps to reproduce:
- What you did
- What you expected
- What actually happened
Creating a Debug Log Bundle
Performance Optimization
Reduce Log Size
Optimize Database
Reduce Memory Usage
-
Disable background refresh:
- Settings → Background Tasks
- Turn off auto-refresh
-
Reduce token cache:
- Fewer active accounts = less memory for quota cache
-
Disable smart warmup:
- Settings → Smart Warmup
- Toggle off if not needed
Related Resources
- Common Issues - Frequently encountered problems
- Account Errors - Authentication and authorization errors
- GitHub Issues - Report bugs and request features