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. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6f8b04405a
commit
4c866e2aef
34
scripts/run-debug.sh
Executable file
34
scripts/run-debug.sh
Executable file
|
|
@ -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 "════════════════════════════════════════════════════════════════"
|
||||
Loading…
Reference in New Issue
Block a user