Copilot Assistant - Multi-Language Development Extension !
Streamline your Copilot development workflow with copilot-assistant. Copilot-assistant provides Copilot full access to your application's logs, aiding it to build your application to your specifications faster and more accurately. Just issue a prompt to copilot in agent mode to write your application and it will test what it has written by inspecting your app's logs. When issues are uncovered, copilot can perform a hot or full restart of your app via copilot-assistant and iterate on code changes without you having to paste errors into the copilot chat, streamlining the dev & test cycle. When files are modified, copilot-assistant will perform a hot-reload if supported by your application language.
Supported languages: Flutter, Go, Java, Python, and Node.js.
Why Use This Extension?
Accelerate Your Development Cycle
- GitHub Copilot Integration: Share logs directly with Copilot for instant analysis
- Programmatic Commands: Copilot can execute extension commands automatically
- Structured Log Output: Your app logs are structured for easy interpretation by Copilot
- Agent Mode Ready: Fully compatible with agent Copilot workflows
- Instant Feedback: Automatic hot reload for Flutter, nodemon-style restarts for other languages
- Smart File Watching: Language-specific patterns detect when to reload vs restart
- Zero Configuration: Auto-detects your project language and runs the right commands
- Cross-Platform: Works seamlessly on Windows, macOS, and Linux
Advanced Log Analysis
- Interactive Log Viewer: Easily search, filter, and analyze logs with regex support
- Ctrl+Click File Navigation: Open source files at specific lines directly from logs with a mouse click
- File/Line Tracking: See exactly where each log originated in your code
- Call Depth Visualization: Understand execution flow with automatic indentation
- Real-Time Monitoring: Push-based updates with instant log delivery
Multi-Language Support
- Flutter: Hot reload/restart with intelligent file pattern detection
- Go: Air/Gin-compatible auto-restart on file changes
- Java: Spring Boot DevTools integration with Maven/Gradle support
- Python: File monitoring with requirements.txt tracking
- Node.js: Nodemon-style reloading for JavaScript/TypeScript projects
Installation & Setup
Requirements
General Requirements:
- VS Code 1.104.0 or higher
- Git for version control integration
Language-Specific Requirements:
- Flutter: Flutter SDK in PATH
- Go: Go runtime and tools
- Java: JDK and Maven/Gradle
- Python: Python interpreter and pip
- Node.js: Node.js runtime and npm/yarn
Install the Extension
- Open VS Code Extensions view (
Ctrl+Shift+X)
- Search for "Copilot Assistant"
- Click Install (by rerosum)
- Restart VS Code
Usage Limits & Pro Version
Copilot Assistant offers both Free and Pro tiers to suit different development needs.
Free Version
The free version includes full functionality with a generous trial period:
- 7-Day Trial - Unlimited queries for the first 7 days
- After trial: 5 log queries per hour
- All features available (start, stop, hot reload, log monitoring, etc.)
- Automatic hourly reset
- No credit card required
Trial Period:
When you first install Copilot Assistant, you get 7 full days of unlimited log queries to experience all Pro features without restrictions.
After Trial:
Once your 7-day trial ends, the free tier includes 5 log queries per hour with automatic hourly reset.
What Counts as a Query:
- Using
@copilot-assistant search or @copilot-assistant logs commands
- Executing
Copilot Assistant: Search Logs with Pattern command
- Calling
copilotAssistant.searchLogs via the extension API
Pro Version - $10 One-Time (Lifetime)
Upgrade to Pro for unlimited access:
- Unlimited log queries - no hourly limits
- Lifetime access - pay once, use forever
- Priority support
- Early access to new features
- Support continued development
How to Upgrade:
- Press
F1 → Copilot Assistant: Upgrade to Pro
- Enter your license key
- Done!
Or click "Upgrade to Pro" when you hit the free tier limit.
Getting Your License Key:
Visit copilot-assistant.net to purchase. License keys follow format: CPAST-XXXXX-XXXXX-XXXXX
Check Your Usage:
F1 → Copilot Assistant: Check Usage & Remaining Queries
Usage
Getting Started
No code changes required! The extension automatically captures all output from your application.
- Open your project folder in VS Code
- Start a new instance:
- Option A: Click "Start New Instance" in the Copilot Assistant sidebar (Explorer panel)
- Option B: Run "Copilot Assistant: Start" from Command Palette (
Ctrl+Shift+P)
- Choose your project:
- 📁 Select Project Directory - Browse and select any project folder (recommended for multiple projects)
- 🎯 Use Workspace Root - Use the current workspace folder
- Extension auto-detects your language (Flutter, Go, Java, Python, or Node.js)
- Logs appear automatically in the "Copilot Assistant" panel
- Ask Copilot to analyze:
@copilot-assistant /logs or @copilot-assistant /errors
Automatic Log Capture:
- All
stdout output from your application
- All
stderr output (errors, warnings)
- Works with any logging:
console.log(), print(), fmt.Println(), System.out.println(), etc.
Multi-Instance Support
Run multiple projects simultaneously! Each instance has its own:
- ✅ Isolated log capture (no cross-contamination)
- ✅ Independent process management
- ✅ Separate log viewer window
- ✅ Individual start/stop/restart controls
Use Cases:
- Microservices: Run frontend + backend + API simultaneously
- Monorepos: Test multiple packages in the same workspace
- Multi-language projects: Run Go backend + React frontend together
- Testing: Compare behavior across different project configurations
Managing Instances:
- Create Instance: Click "Start New Instance" button
- View Instances: Expand "Application" category in the sidebar to see all instances
- Instance Controls: Right-click any instance for options:
- Start - Launch this instance
- Stop - Terminate this instance
- Restart - Restart with log clear
- Hot Reload - Trigger hot reload (Flutter/supported)
- Show Logs - Open dedicated log viewer
- Clear Logs - Clear this instance's logs
- Open Terminal - Open terminal in project directory
- Remove - Delete this instance
- Stop All: Click "Stop All" to terminate everything
- Check Status: Expand "Status" category to see app status, log service, and usage tier
Instance Identification:
- Each instance displays:
🟢 project_name (Language) or 🔴 project_name (Language)
- Example:
🟢 simple_node_app (Node.js) or 🔴 my-api (Go)
- Green (🟢) = running, Red (🔴) = stopped
Access all functions from the Copilot Assistant sidebar:
Application Category
- Start New Instance - Create and configure a new project instance
- Stop All Instances - Terminate all running instances
- Instance List - Shows all instances directly with status icons (🟢 running, 🔴 stopped)
Status Category (auto-refreshes every 5 seconds)
- App Status - Shows running/total instances (e.g., "🟢 App: 1/1 running")
- Log Service - Shows log service status (🟢 running, 🔴 stopped)
- Usage Tier - Displays your current tier (🎯 Trial or 🏆 Pro)
Per-Instance Controls (right-click on any instance)
- Start - Launch this instance's development server
- Stop - Terminate this instance's process
- Restart - Restart this instance and clear logs
- Hot Reload - Trigger hot reload (Flutter/supported frameworks)
- Show Logs - Open dedicated log viewer for this instance
- Clear Logs - Clear this instance's captured logs
- Open Terminal - Open terminal in this instance's project directory
- Remove - Delete this instance
Available Commands
Access via Command Palette (Ctrl+Shift+P):
Instance Management:
- Copilot Assistant: Start - Create new instance or use workspace root
- Copilot Assistant: Stop Instance - Stop a specific instance
- Copilot Assistant: Start Instance - Start a specific instance
- Copilot Assistant: Restart Instance - Restart a specific instance
- Copilot Assistant: Hot Reload Instance - Trigger hot reload for instance
- Copilot Assistant: Stop All Instances - Terminate all running instances
- Copilot Assistant: Remove Instance - Delete a specific instance
Instance Logs:
- Copilot Assistant: Show Instance Logs - View logs for a specific instance
- Copilot Assistant: Clear Instance Logs - Clear logs for a specific instance
- Copilot Assistant: Open Instance Terminal - Open terminal in instance's project directory
Log Management:
- Copilot Assistant: Search Logs - Open interactive log viewer
- Copilot Assistant: Search Logs with Pattern - Search logs programmatically
- Copilot Assistant: Clear Captured Logs - Clear log history
- Copilot Assistant: Get Log Statistics & Analysis - View detailed log analysis
- Copilot Assistant: Query Logs - Query logs programmatically
- Copilot Assistant: Query Logs (Interactive) - Interactive log query
Configuration:
- Copilot Assistant: Select Project Language - Override auto-detection
- Copilot Assistant: Show Extension Version - Display version info
Usage & Licensing:
- Copilot Assistant: Check Usage & Remaining Queries - View current usage limits
- Copilot Assistant: Upgrade to Pro - Enter Pro license key
- Copilot Assistant: View Pricing - View pricing information
Development/Testing:
- Copilot Assistant: Test Log Service - Test log capture functionality
- Copilot Assistant: Start Log Server - Manually start log server
- Copilot Assistant: Stop Log Server - Manually stop log server
- Copilot Assistant: Get API Health - Check API health status
Language-Specific Behavior
Flutter
- Hot reload on
.dart file saves
- Hot restart on
main.dart, pubspec.yaml, or provider/service/model changes
- Command:
flutter run --debug -d windows (platform-adaptive)
Go
- Watches
.go files and go.mod
- Full restart on changes (Air/nodemon-style)
- Command:
go run . (configurable)
- Excludes test files by default
Java
- Watches
.java, pom.xml, build.gradle, resources
- Spring Boot DevTools supported
- Command:
mvn spring-boot:run
- Excludes build output directories
Python
- Watches
.py, requirements.txt, setup.py, pyproject.toml
- Full restart on changes
- Auto-detects main file
- Excludes
__pycache__ and .pyc files
Node.js
- Watches
.js, .ts, .json, package.json
- Nodemon-style restart
- Command:
npm start
- Excludes
node_modules and build directories
GitHub Copilot Integration
The extension provides seamless integration with GitHub Copilot through programmatic commands and structured log output.
Copilot Commands (Programmatic Access)
Copilot can execute these commands directly without user interaction:
// Search logs programmatically (results written to file)
run_vscode_command({
commandId: "copilotAssistant.searchLogs",
args: ["ERROR"] // Search pattern
})
// Then read the search results
read_file({
filePath: "<workspace>/.copilot-assistant/search-results.txt"
})
// Get recent logs (appears in "Copilot Assistant" output channel)
run_vscode_command({
commandId: "copilotAssistant.getLogsForCopilot"
})
// Get error logs (appears in "Copilot Assistant" output channel)
run_vscode_command({
commandId: "copilotAssistant.getErrorsForCopilot"
})
// Get health status (appears in "Copilot Assistant" output channel)
run_vscode_command({
commandId: "copilotAssistant.getHealthForCopilot"
})
Chat Commands (Interactive)
Use these commands in Copilot Chat for interactive debugging:
@copilot-assistant /start - Start the application
@copilot-assistant /stop - Stop the application
@copilot-assistant /restart - Restart with log clear
@copilot-assistant /reload - Trigger hot reload
@copilot-assistant /errors - Get formatted error logs
@copilot-assistant /logs - Open log search interface
AI Debugging Workflow
Quick Error Analysis
@copilot-assistant /errors
Get formatted error logs optimized for AI processing
Programmatic Log Search
- Copilot executes:
copilotAssistant.searchLogs with pattern
- Results written to:
.copilot-assistant/search-results.txt
- Copilot reads file and analyzes matches
- No user interaction required!
Performance Investigation
- Use
@copilot-assistant /logs to open search
- Search: "slow", "timeout", "latency", "memory"
- Copy relevant logs and ask Copilot for analysis
Development Loop
- Start app:
@copilot-assistant /start
- Code with AI suggestions
- Monitor:
@copilot-assistant /errors
- Debug with Copilot's help
- Iterate continuously
Key Features:
- In-Memory Logs: Fast searches across up to 10,000 log entries
- Search Results File: Copilot can read
.copilot-assistant/search-results.txt directly
- Unified Output: All log analysis appears in "Copilot Assistant" output channel
- Programmatic Commands: Copilot can execute commands without manual user intervention
- Structured Output: Formatted logs ready for AI consumption
- Agent Mode Compatible: Works with
chat.agent.enabled: true
- Cross-Platform: Windows, macOS, Linux support
Optional: Enhanced Logging Features
Want advanced features like clickable file/line navigation and call depth visualization? You can optionally enhance your logging to include file/line information and call depth tracking.
These enhancements are completely optional - the extension works perfectly without them!
Quick AI Enhancement - Use This Copilot Prompt
Enhance my logging service to include file and line number information, plus call depth tracking for the Copilot Assistant VS Code extension.
REQUIREMENTS:
1. Add file:line info to all log messages in this format: [filename.ext:line]
- Use your language's stack trace/inspection API to get the caller's file and line
- Place the file:line at the START of the message: "[file.py:42] Log message here"
- Support these file extensions: .js, .ts, .jsx, .tsx, .py, .java, .go, .rs, .cpp, .c, .cs
2. Add call depth/indentation tracking:
- Track nesting level (depth) for function call hierarchies
- Add 2 spaces per depth level to the message: " " * depth
- Provide methods to increase/decrease depth: indent() and dedent()
- Support context managers/decorators for automatic depth management
3. Keep the existing log format, just prepend the enhancements:
BEFORE: "2025-10-04T07:00:05.511141 [INFO] Processing request"
AFTER: "2025-10-04T07:00:05.511141 [INFO] [trading.py:42] Processing request"
NESTED: "2025-10-04T07:00:05.512141 [INFO] [validator.py:23] Validating data"
Please maintain my existing logging infrastructure and enhance it with these features. Show me the complete implementation.
Python Implementation Examples
Simple Decorator Approach
import logging
import inspect
import functools
def with_file_line(func):
"""Decorator to automatically add file:line info to log messages"""
@functools.wraps(func)
def wrapper(message, *args, **kwargs):
frame = inspect.currentframe().f_back
filename = frame.f_code.co_filename.split('/')[-1]
lineno = frame.f_lineno
enhanced_message = f"[{filename}:{lineno}] {message}"
return func(enhanced_message, *args, **kwargs)
return wrapper
# Wrap your logging functions
log_info = with_file_line(logging.info)
log_debug = with_file_line(logging.debug)
log_warning = with_file_line(logging.warning)
log_error = with_file_line(logging.error)
# Usage:
log_info("Detected 1 total hedged straddle spreads")
# Output: [INFO] [trading_engine.py:42] Detected 1 total hedged straddle spreads
Full Logger Class with Indentation
import logging
import inspect
from contextlib import contextmanager
class IndentedLogger:
def __init__(self, logger):
self.logger = logger
self.depth = 0
def _get_context(self):
frame = inspect.currentframe().f_back.f_back
filename = frame.f_code.co_filename.split('/')[-1]
lineno = frame.f_lineno
return filename, lineno
def _format_message(self, message):
filename, lineno = self._get_context()
indent = " " * self.depth
return f"{indent}[{filename}:{lineno}] {message}"
def info(self, message):
self.logger.info(self._format_message(message))
def debug(self, message):
self.logger.debug(self._format_message(message))
def warning(self, message):
self.logger.warning(self._format_message(message))
def error(self, message):
self.logger.error(self._format_message(message))
def indent(self):
"""Increase indentation level"""
self.depth += 1
def dedent(self):
"""Decrease indentation level"""
self.depth = max(0, self.depth - 1)
@contextmanager
def indented(self, message=None):
"""Context manager for automatic indentation"""
if message:
self.info(message)
self.indent()
try:
yield self
finally:
self.dedent()
# Usage:
logger = IndentedLogger(logging.getLogger(__name__))
logger.info("Processing request")
with logger.indented():
logger.info("Validating data")
with logger.indented("Checking permissions"):
logger.info("User authenticated")
logger.info("Role verified")
logger.info("Data validated")
Output:
[INFO] [main.py:45] Processing request
[INFO] [validator.py:23] Validating data
[INFO] [auth.py:67] Checking permissions
[INFO] [auth.py:72] User authenticated
[INFO] [auth.py:78] Role verified
[INFO] [validator.py:28] Data validated
Java Implementation Pattern
// Use Thread.currentThread().getStackTrace()
// Create a custom Logger wrapper class
// Track depth with ThreadLocal for thread-safety
// Provide try-with-resources compatible depth tracking
public class ContextLogger {
private static ThreadLocal<Integer> depth = ThreadLocal.withInitial(() -> 0);
private Logger logger;
public ContextLogger(Logger logger) {
this.logger = logger;
}
private String getContext() {
StackTraceElement caller = Thread.currentThread().getStackTrace()[3];
String fileName = caller.getFileName();
int lineNumber = caller.getLineNumber();
String indent = " ".repeat(depth.get());
return String.format("%s[%s:%d] ", indent, fileName, lineNumber);
}
public void info(String message) {
logger.info(getContext() + message);
}
public void indent() {
depth.set(depth.get() + 1);
}
public void dedent() {
depth.set(Math.max(0, depth.get() - 1));
}
}
JavaScript/TypeScript Implementation Pattern
// Use Error().stack to parse caller location
// Track depth in a closure or class instance
class ContextLogger {
constructor() {
this.depth = 0;
}
_getContext() {
const stack = new Error().stack.split('\n');
const caller = stack[3]; // Adjust based on your stack depth
const match = caller.match(/\((.*):(\d+):\d+\)/) || caller.match(/at (.*):(\d+):\d+/);
if (match) {
const file = match[1].split('/').pop();
const line = match[2];
const indent = ' '.repeat(this.depth);
return `${indent}[${file}:${line}] `;
}
return '';
}
info(message) {
console.log(`[INFO] ${this._getContext()}${message}`);
}
indent() {
this.depth++;
}
dedent() {
this.depth = Math.max(0, this.depth - 1);
}
}
// Usage
const logger = new ContextLogger();
logger.info("Processing request");
logger.indent();
logger.info("Validating data");
logger.dedent();
What You'll Get:
Before Enhancement:
[INFO] Processing hedge positions
[INFO] Detected 1 total hedged straddle spreads
After Enhancement:
[INFO] [trading.py:42] Processing hedge positions
[INFO] [analyzer.py:123] Detected 1 total hedged straddle spreads
In the Extension:
[trading.py:42] Processing hedge positions
[analyzer.py:123] Detected 1 total hedged straddle spreads
└─ File badge shows source and line
└─ Indentation shows call hierarchy
└─ Left border guide indicates nesting
Recognized Patterns:
- File:line formats:
[file.py:123], (file.py:123), file.py:123, stack traces
- Depth patterns: Leading spaces (every 2 spaces = 1 level), arrows (→), dots (...)
- JSON logs: Automatically parses wrapped JSON:
[timestamp] [level] [source] {"message":"[file:line] text"}
- Supported extensions:
.js, .ts, .jsx, .tsx, .py, .java, .go, .rs, .cpp, .c, .cs, .dart, .php, .rb, .swift, .kt, .scala
JSON Log Support:
The extension automatically detects and parses JSON-formatted logs, extracting file/line information and metadata. Perfect for apps that output structured logs!
Example:
Input: [2025-10-12T12:59:59.839Z] [DEBUG] [Flutter] [APP] {"level":"debug","message":"[app.dart:123] Starting..."}
Output: [app.dart:123] Starting... (with clickable file badge)
Implementation Best Practices
When to Use Indentation
DO Use Indentation For:
- Nested function calls: Show execution hierarchy
- Multi-step processes: Visualize workflow stages
- Loops/iterations: Track repeated operations
- Conditional branches: Show decision paths taken
- Error handling: Indent exception details
- Transaction boundaries: Show atomic operations
DON'T Over-Indent:
- Simple sequential operations: Flat is fine
- Getters/setters: Too granular
- One-line utilities: No value added
- Library calls: Unless debugging library itself
Example - Good Indentation:
logger.info("Processing user order [#12345](https://github.com/rerosum/copilot-assistant/issues/12345)")
with logger.indented():
logger.info("Validating payment method")
with logger.indented():
logger.info("Checking card expiration")
logger.info("Verifying CVV")
logger.info("Payment validated")
logger.info("Reserving inventory")
logger.info("Generating invoice")
logger.info("Order completed successfully")
Performance Considerations
Stack Inspection Cost:
inspect.currentframe() (Python): ~1-5 microseconds per call
Error().stack (JavaScript): ~10-50 microseconds
Thread.getStackTrace() (Java): ~5-20 microseconds
Mitigation Strategies:
Conditional Compilation (production vs development)
# Enable detailed logging only in debug mode
if DEBUG:
logger = IndentedLogger(base_logger)
else:
logger = base_logger # No overhead
Log Level Gating (skip stack inspection if not logging)
def info(self, message):
if not self.logger.isEnabledFor(logging.INFO):
return # Skip expensive stack walk
filename, lineno = self._get_context()
# ... rest of logging
Caching Strategy (cache file:line per function)
_cache = {} # {function_name: (file, line)}
def _get_context_cached(self):
frame = inspect.currentframe().f_back.f_back
func_name = frame.f_code.co_name
if func_name not in _cache:
_cache[func_name] = (filename, lineno)
return _cache[func_name]
Recommended Approach:
- Use full context logging in development/staging
- Use basic logging (no stack inspection) in production
- Enable detailed logging on-demand via environment variable
Testing Strategy
Unit Testing with Indentation:
import unittest
from io import StringIO
import logging
class TestIndentedLogger(unittest.TestCase):
def setUp(self):
self.stream = StringIO()
handler = logging.StreamHandler(self.stream)
handler.setFormatter(logging.Formatter('[%(levelname)s] %(message)s'))
self.logger = logging.getLogger('test')
self.logger.handlers = [handler]
self.logger.setLevel(logging.DEBUG)
self.indented = IndentedLogger(self.logger)
def test_basic_logging(self):
self.indented.info("Test message")
output = self.stream.getvalue()
self.assertIn("Test message", output)
self.assertIn("[test_logger.py:", output)
def test_indentation(self):
self.indented.info("Level 0")
self.indented.indent()
self.indented.info("Level 1")
self.indented.indent()
self.indented.info("Level 2")
output = self.stream.getvalue()
lines = output.strip().split('\n')
# Verify indentation depth
self.assertNotIn(" ", lines[0]) # No indent
self.assertIn(" ", lines[1]) # 2 spaces
self.assertIn(" ", lines[2]) # 4 spaces
def test_context_manager(self):
self.indented.info("Start")
with self.indented.indented():
self.indented.info("Nested")
self.indented.info("End")
output = self.stream.getvalue()
lines = output.strip().split('\n')
# Verify automatic dedent
self.assertNotIn(" ", lines[0]) # Start - no indent
self.assertIn(" ", lines[1]) # Nested - indented
self.assertNotIn(" ", lines[2]) # End - back to no indent
Integration Testing:
- Test with Copilot Assistant extension
- Verify file:line badges appear correctly
- Validate indentation guides render properly
- Check search/filter functionality with enhanced logs
Common Pitfalls & Solutions
Pitfall 1: Incorrect Stack Frame Depth
# WRONG: Gets logger class location, not caller
def _get_context(self):
frame = inspect.currentframe() # This frame
# Returns logger.py:123 instead of app.py:456
# CORRECT: Walk up 2 frames
def _get_context(self):
frame = inspect.currentframe().f_back.f_back # Caller's frame
# Returns app.py:456 as expected
Pitfall 2: Forgetting to Dedent
# WRONG: Indentation leaks
logger.indent()
process_data()
# Forgot logger.dedent() - all subsequent logs stay indented
# CORRECT: Always use context manager
with logger.indented():
process_data()
# Automatic dedent guaranteed
Pitfall 3: Thread-Safety Issues (Multi-threaded Apps)
# WRONG: Shared depth across threads
class IndentedLogger:
def __init__(self):
self.depth = 0 # All threads share this!
# CORRECT: Thread-local depth
import threading
class IndentedLogger:
def __init__(self):
self._local = threading.local()
@property
def depth(self):
if not hasattr(self._local, 'depth'):
self._local.depth = 0
return self._local.depth
@depth.setter
def depth(self, value):
self._local.depth = value
Pitfall 4: Performance in Tight Loops
# WRONG: Stack inspection in hot path
for i in range(1_000_000):
logger.info(f"Processing item {i}") # 1M stack walks!
# CORRECT: Conditional logging
if logger.is_debug_enabled():
logger.info(f"Starting batch processing")
for i in range(1_000_000):
process(item)
if i % 10000 == 0: # Log every 10k items
logger.info(f"Processed {i} items")
Configuration
Access settings via Command Palette (Ctrl+Shift+P) → "Preferences: Open Settings (UI)" → Search "Copilot Assistant"
Language Detection
{
"copilotAssistant.language": "auto"
}
Options: auto, flutter, go, java, python, nodejs
Default: auto (automatic detection)
Usage: Override auto-detection by setting to specific language
Smart Restart Behavior
{
"copilotAssistant.enableSmartRestart": true,
"copilotAssistant.restartDelay": 2000
}
enableSmartRestart (Boolean, default: true): Enable automatic restart based on file patterns
restartDelay (Number 0-30000, default: 2000): Milliseconds to wait before restart (batches multiple file changes)
Log Management Configuration
{
"copilotAssistant.logServer.maxLogs": 10000,
"copilotAssistant.logServer.autoShowLogsWindow": true,
"copilotAssistant.logServer.fontSize": 14,
"copilotAssistant.logServer.logLevel": "debug"
}
Settings:
maxLogs (100-100000, default: 10000): Maximum log entries in memory
autoShowLogsWindow (Boolean, default: true): Auto-open log viewer on start
fontSize (8-24, default: 14): Log entry font size in pixels
logLevel (String, default: debug): Minimum level to capture (debug, info, warn, error)
Note: Logs are captured automatically when your application runs
Environment Variable Integration
The extension sets LOG_LEVEL environment variable for your application:
// Node.js/JavaScript
const logLevel = process.env.LOG_LEVEL || 'INFO';
// Python
import os
log_level = os.environ.get('LOG_LEVEL', 'INFO')
// Go
logLevel := os.Getenv("LOG_LEVEL")
File Watching Patterns
Customize which files trigger reload/restart per language:
Click to expand: File Watching Configuration
{
"copilotAssistant.fileWatching": {
"flutter": {
"hotReloadPatterns": ["**/*.dart"],
"hotRestartPatterns": ["**/main.dart", "**/pubspec.yaml"],
"excludePatterns": ["**/.dart_tool/**", "**/build/**"]
},
"go": {
"watchPatterns": ["**/*.go", "**/go.mod"],
"excludePatterns": ["**/*_test.go", "**/vendor/**"]
},
"java": {
"watchPatterns": ["**/*.java", "**/pom.xml", "**/build.gradle"],
"excludePatterns": ["**/target/**", "**/build/**"]
},
"python": {
"watchPatterns": ["**/*.py", "**/requirements.txt"],
"excludePatterns": ["**/__pycache__/**", "**/*.pyc"]
},
"nodejs": {
"watchPatterns": ["**/*.js", "**/*.ts", "**/package.json"],
"excludePatterns": ["**/node_modules/**", "**/dist/**"]
}
}
}
Pattern Options:
watchPatterns: Files that trigger restart
hotReloadPatterns: Files that trigger hot reload (Flutter only)
hotRestartPatterns: Files that trigger hot restart (Flutter only)
excludePatterns: Files/directories to ignore
restartDelay: Per-language override for restart delay
Pattern Syntax:
** = any number of directories
* = any characters except /
? = single character except /
{} = match any pattern inside (e.g., **/*.{js,ts})
Configuration Tips
Performance Optimization:
- Disable
autoShowLogsWindow for less UI overhead
- Set
maxLogs to 1000-5000 for memory-constrained systems
- Set
logLevel to info or warn to reduce noise
Debugging:
- Keep
logLevel at debug for full visibility
- Increase
maxLogs to 50000+ for long sessions
- Enable
autoShowLogsWindow for immediate feedback
Team Projects:
- Use
.vscode/settings.json for shared workspace settings
- Document any custom
port or file watching overrides
- Share consistent
restartDelay and logLevel across team
Log Viewer
The interactive log viewer provides manual analysis workflows for detailed debugging.
Opening the Log Viewer
- Click Search Logs in the Copilot Assistant sidebar
- Run "Copilot Assistant: Show Logs" from Command Palette (
Ctrl+Shift+P)
The log viewer features a modern toolbar with:
- Process controls (Start, Hot Reload, Restart, Stop) with color-coded glassmorphic buttons
- Log management (Clear Viewer, Reload Logs) for instant log operations
- Dynamic status showing real-time app state and selection count
- File navigation via Ctrl+Click on log file paths
Manual Analysis Workflows
Error Investigation
- Open Log Viewer and filter by ERROR level
- Search for specific error terms
- Ctrl+Click file paths to jump to error source code
- Select relevant error logs (click rows)
- Logs auto-copy to clipboard for AI analysis
Performance Debugging
- Search keywords: "slow", "timeout", "latency", "memory"
- Use regex patterns:
timeout.*connection
- Ctrl+Click file paths to inspect bottleneck locations
- Multi-select related logs for context
- Copy selected logs to clipboard for AI analysis
Development Monitoring
- Enable auto-scroll for live output
- Use level filters for specific log types
- Use Hot Reload to test changes instantly
- Ctrl+Click file paths to navigate to logged locations
- Logs auto-clear on Restart for clean debugging sessions
Search & Filtering
Search Features:
- Real-time filtering as you type (150ms debounce)
- Case-insensitive text search across all log messages
- Search history with arrow keys (↑/↓ to navigate previous searches)
- Matched text highlighted in yellow
- Clear search: Press
ESC to clear and blur, or Backspace on empty input
Example Searches:
error - Find all messages containing "error"
user login - Find messages with both words
timeout connection - Find performance issues
192.168 - Find IP address patterns
Log Selection & Copy
- Click to Select: Click any log row (blue highlight)
- Multi-Select: Click additional rows to build context
- Auto-Copy: Selected logs automatically copied to clipboard in chronological order
- Deselect: Click selected row again to remove from selection
- Multi-Line Format: Each log on separate line for easy pasting
Tips:
- Select logs before sharing with AI assistants
- Use multi-select to build context around issues
- Paste copied logs into external analysis tools or chat
Log Level Filtering
Click level buttons: DEBUG, INFO, WARN, ERROR
Common Strategies:
- Error Focus: Show only ERROR for critical issues
- Production: Show WARN and ERROR only
- Development: Enable all levels for full visibility
- Performance: INFO/WARN with specific searches
The log viewer features a modern toolbar with subtle glassmorphic styling and icon-based buttons:
Process Controls:
- Start - Launch your application
- Hot Reload - Trigger hot reload (Flutter/supported frameworks)
- Restart - Restart the application and clear logs
- Stop - Stop the running application
Log Management:
- Clear Viewer - Clear the webview display and in-memory logs
- Copy Selected - Copy selected logs to clipboard in chronological order
Dynamic Status Indicators:
- Status labels update in real-time: "App Started" / "App Stopped"
- Selection counter displays: "X/Y selected" format (total selected / total visible logs)
- Hot Reload button automatically disabled for non-Flutter projects
File Navigation
Ctrl+Hover to Open Files:
- Log entries display file locations:
[filename.py:123]
- Hold Ctrl and hover over any file path
- File path becomes clickable with underline
- Click to open file in editor at the exact line number
- Works for all supported extensions:
.py, .js, .ts, .java, .go, etc.
Example:
[INFO] [trading.py:42] Processing order
└─ Ctrl+Click opens trading.py at line 42
Interactive Features
Auto-Scroll:
- Enable by scrolling to bottom
- Disable by scrolling up or selecting logs
- Smart pause when reviewing selections
Real-Time Updates:
- Push-based architecture for instant log updates
- No polling overhead - event-driven performance
- Logs appear instantly as your app writes them
- Auto-clear on application restart
Keyboard Shortcuts:
- End: Jump to latest log
- Ctrl+F: Focus search box
- Ctrl+Click: Open file at line (on file paths)
- Escape: Clear search and deselect
- Backspace (empty): Clear search
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with VS Code Extension framework
- Designed for seamless GitHub Copilot integration
- Community feedback and contributions
Support
For support, issues, and feature requests:
Happy Coding with Copilot Assistant!