Files
sammykumar-ComfyUI-SwissArm…/docs/infrastructure/debug
Sam Kumar 54319b0a18 feat(ui-widgets): Implement Control Panel JSON Data Format Fix
- Resolved issue with Control Panel displaying concatenated string instead of individual fields from MediaDescribe node.
- Updated backend to send structured JSON data instead of formatted string.
- Enhanced frontend to parse JSON and display fields in a two-column layout for improved readability.

fix(ui-widgets): Add Dimensions Display Widget Troubleshooting Guide

- Created a comprehensive troubleshooting guide for the Dimensions Display Widget.
- Included quick verification steps, common issues, and detailed testing procedures.

docs(ui-widgets): Document Dimensions Display Widget Implementation

- Added documentation for the Dimensions Display Widget, detailing its features and UI behavior.
- Included examples and troubleshooting tips for users.

fix(ui-widgets): Final String Widget Population Fix

- Fixed issue where final_string widget was not being updated post-execution.
- Implemented onExecuted methods to ensure widget reflects the generated description.

docs(ui-widgets): Update README with UI Widgets Documentation

- Compiled and organized documentation for various UI widgets.
- Included links to related documentation and implementation patterns.

feat(ui-widgets): Restore Seed Widget Functionality

- Reintroduced seed widget for MediaDescribe node to enable randomization.
- Added functionality to force re-execution based on seed changes.

fix(ui-widgets): Address Widget Visibility Issues

- Resolved issues with unwanted widgets appearing in MediaDescribe node.
- Improved widget management to ensure correct visibility based on media type and source.

fix(ui-widgets): Implement Widget State Persistence

- Added serialization for widget visibility state in GeminiUtilMediaDescribe node.
- Ensured UI state is preserved across workflow saves and reloads.
2025-10-02 18:34:39 -05:00
..

Debug System Documentation

Unified debug and logging system for ComfyUI-SwissArmyKnife.

📄 Documentation Files

🎯 Quick Reference

Debug Configuration

Debug mode can be enabled/disabled via:

  1. Server Config: /swissarmyknife/config endpoint
  2. Environment Variable: DEBUG_ENABLED=true
  3. Runtime: Toggle via API

Debug Output

When enabled, debug output appears in:

  • Browser console (JavaScript widgets)
  • Server logs (Python nodes)
  • Network tab (API calls)

Usage

# Python - use debug logging
from utils.debug import debug_log
debug_log("My debug message", variable_name)
// JavaScript - conditional logging
const debugLog = (...args) => {
    if (DEBUG_ENABLED) {
        console.log('[ComponentName]', ...args);
    }
};

🔧 Features

Unified System

  • Consistent Format: [ComponentName] Message: data
  • Conditional Output: Only logs when debug mode is enabled
  • Performance: Zero overhead when disabled
  • Granular Control: Per-component debug levels

Component Tags

  • [VideoPreview] - Video preview widget debug
  • [LoRALoader] - LoRA loading debug
  • [MediaDescribe] - Gemini API debug
  • [CivitAI] - CivitAI integration debug
  • [Cache] - Caching system debug

🐛 Debugging Workflow

  1. Enable Debug Mode: Set DEBUG_ENABLED=true in config
  2. Reproduce Issue: Run the workflow that causes the problem
  3. Check Logs: Review browser console and server logs
  4. Identify Component: Look for component tags in logs
  5. Analyze Data: Examine logged variables and state
  6. Fix and Test: Make changes and verify with debug logs
  7. Disable Debug: Turn off debug mode for production

Category: Infrastructure Status: Stable