From 4f4504bae00097d8a5de3429e46d123f0eaf8c3a Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Fri, 9 Jan 2026 21:36:36 -0500 Subject: [PATCH] feat(scripts): add run-debug.sh for convenient debug mode launching Add convenience script for running VideoTools in debug mode: - Automatically enables --debug flag - Outputs to both console and timestamped log file - Creates logs/ directory with organized debug logs - Shows log file location before and after run Usage: ./scripts/run-debug.sh Logs saved to: logs/videotools_debug_YYYYMMDD_HHMMSS.log This makes debugging much easier without typing the full command with tee redirection every time. --- scripts/run-debug.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 scripts/run-debug.sh diff --git a/scripts/run-debug.sh b/scripts/run-debug.sh new file mode 100755 index 0000000..c9d7847 --- /dev/null +++ b/scripts/run-debug.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# VideoTools Debug Run Script +# Runs VideoTools with debug logging enabled and outputs to both console and log file + +set -e + +PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +LOG_DIR="$PROJECT_ROOT/logs" +TIMESTAMP=$(date +%Y%m%d_%H%M%S) +LOG_FILE="$LOG_DIR/videotools_debug_${TIMESTAMP}.log" + +# Create logs directory if it doesn't exist +mkdir -p "$LOG_DIR" + +echo "════════════════════════════════════════════════════════════════" +echo " VideoTools Debug Mode" +echo "════════════════════════════════════════════════════════════════" +echo "" +echo "Debug output will be saved to:" +echo " $LOG_FILE" +echo "" +echo "Press Ctrl+C to stop VideoTools" +echo "════════════════════════════════════════════════════════════════" +echo "" + +# Run VideoTools with debug flag, output to both console and log file +cd "$PROJECT_ROOT" +./VideoTools --debug 2>&1 | tee "$LOG_FILE" + +echo "" +echo "════════════════════════════════════════════════════════════════" +echo "VideoTools stopped. Debug log saved to:" +echo " $LOG_FILE" +echo "════════════════════════════════════════════════════════════════"