aiskillstore/marketplace / skills/8beeeaaat/debug-tauri
debug-tauri
VerifiedAutomates Tauri WebView debugging using official plugins (tauri-plugin-log + screenshots) with process verification, automated screenshots, console logs, and state analysis. Use when debugging Tauri apps, investigating WebView issues, analyzing runtime errors, or troubleshooting UI problems.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.8 KB |
| references/IPC_COMMANDS.md | markdown | 3.9 KB |
| references/LOGGING.md | markdown | 4.8 KB |
| references/MIGRATION.md | markdown | 10.4 KB |
| references/REFERENCE.md | markdown | 5.2 KB |
| references/REPORT_TEMPLATE.md | markdown | 3.1 KB |
| references/SCREENSHOTS.md | markdown | 4.0 KB |
| references/TROUBLESHOOTING.md | markdown | 2.8 KB |
| scripts/analyze_logs.shexecutable | script | 3.6 KB |
| scripts/capture.shexecutable | script | 2.4 KB |
| scripts/validate_setup.shexecutable | script | 4.9 KB |
| skill-report.json | config | 225.7 KB |
scripts/validate_setup.sh
View on GitHub#!/bin/bash
# Validate debug tools setup with official plugins
# Usage: ./validate_setup.sh [bundle-id]
#
# Examples:
# TAURI_BUNDLE_ID=com.example.myapp ./validate_setup.sh
# ./validate_setup.sh com.example.myapp
APP_NAME="${TAURI_APP_NAME:-tauri-app}"
BUNDLE_ID="${1:-${TAURI_BUNDLE_ID}}"
# Detect log file path based on platform
detect_log_path() {
local bundle_id="$1"
if [ -z "$bundle_id" ]; then
return 1
fi
case "$(uname -s)" in
Darwin)
echo "$HOME/Library/Logs/$bundle_id/debug.log"
;;
Linux)
echo "$HOME/.local/share/$bundle_id/logs/debug.log"
;;
MINGW*|MSYS*|CYGWIN*)
echo "$LOCALAPPDATA/$bundle_id/logs/debug.log"
;;
*)
return 1
;;
esac
}
echo "π Validating debug setup..."
echo "============================"
echo ""
# Check if app is running
echo "π± App Process:"
if pgrep -x "$APP_NAME" > /dev/null; then
pid=$(pgrep -x "$APP_NAME")
echo " β
App is running (PID: $pid)"
# Get process details
if command -v ps &> /dev/null; then
ps -p "$pid" -o pid,rss,%cpu,%mem,command 2>/dev/null | tail -1
fi
else
echo " β οΈ App not running"
echo " π‘ Start with: tauri dev"
fi
echo ""
# Check screen recording permission (macOS only)
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "πΈ Screen Recording Permission:"
test_file="/tmp/screen_test_$$.png"
if screencapture -x -T 0 "$test_file" 2>/dev/null; then
rm -f "$test_file"
echo " β
Screen recording permission granted"
else
echo " β Screen recording permission denied"
echo " π‘ Grant in: System Preferences > Security & Privacy > Screen Recording"
fi
echo ""
fi
# Check for official plugin log file
echo "π Official Plugin Logs (tauri-plugin-log):"
if [ -n "$BUNDLE_ID" ]; then
PLUGIN_LOG=$(detect_log_path "$BUNDLE_ID")
if [ -n "$PLUGIN_LOG" ] && [ -f "$PLUGIN_LOG" ]; then
log_size=$(wc -l < "$PLUGIN_LOG" | tr -d ' ')
echo " β
Plugin log file exists ($log_size lines)"
echo " Location: $PLUGIN_LOG"
if [ "$log_size" -eq 0 ]; then
echo " β οΈ Log file is empty - logger may not be initialized"
echo " π‘ Call logger.initialize() in frontend"
fi
else
echo " β οΈ Plugin log file not found"
echo " π‘ Expected: $PLUGIN_LOG"
echo " π‘ Ensure tauri-plugin-log is initialized and app has been run"
fi
else
echo " βΉοΈ Bundle ID not provided"
echo " π‘ Set TAURI_BUNDLE_ID or pass as argument to check plugin logs"
echo " π‘ Example: TAURI_BUNDLE_ID=com.example.myapp ./validate_setup.sh"
fi
# Check for legacy log file
echo ""
echo "π Legacy Logs (consoleLogger):"
if compgen -G "/tmp/tauri_console_logs_*.jsonl" > /dev/null; then
log_file=$(ls -t /tmp/tauri_console_logs_*.jsonl 2>/dev/null | head -1)
log_size=$(wc -l < "$log_file" | tr -d ' ')
echo " β οΈ Legacy log file exists ($log_size lines)"
echo " π‘ Migrate to tauri-plugin-log for better persistence"
else
echo " β
No legacy logs (good - using official plugin)"
fi
# Check for screenshots
echo ""
echo "πΈ Screenshots:"
screenshot_count=$(find /tmp -name "tauri_debug_*.png" -mtime -1 2>/dev/null | wc -l | tr -d ' ')
if [ "$screenshot_count" -gt 0 ]; then
echo " βΉοΈ Found $screenshot_count legacy screenshot(s) in /tmp"
echo " $(ls -t /tmp/tauri_debug_*.png 2>/dev/null | head -1)"
echo " π‘ Use captureMainWindow() from screenshotHelper for plugin API"
else
echo " βΉοΈ No legacy screenshots found"
fi
echo ""
# Check for required tools
echo "π οΈ Tools:"
check_tool() {
local tool=$1
local status=$2
local install_hint=$3
if command -v "$tool" &> /dev/null; then
echo " β
$tool ($status)"
else
echo " β οΈ $tool not found ($status)"
if [ -n "$install_hint" ]; then
echo " Install: $install_hint"
fi
fi
}
# Optional tools
if [[ "$OSTYPE" == "darwin"* ]]; then
check_tool "screencapture" "legacy, optional" ""
fi
echo ""
# Check project structure (if run from project root)
echo "π Project Structure:"
if [ -f "tauri.conf.json" ] || [ -f "src-tauri/tauri.conf.json" ]; then
echo " β
Tauri project detected"
# Check for debug capabilities
if [ -f "src-tauri/capabilities/default.json" ]; then
echo " β
Capabilities file exists"
if grep -q "debug-tools" src-tauri/capabilities/default.json 2>/dev/null; then
echo " β
Debug tools permissions found"
else
echo " β οΈ Debug tools permissions may not be configured"
fi
else
echo " βΉοΈ No capabilities file found"
fi
else
echo " βΉοΈ Not in a Tauri project directory (or run from skill directory)"
fi
echo ""
echo "=========================================="
echo "β
Validation complete"
echo ""
# Summary
if pgrep -x "$APP_NAME" > /dev/null && [[ "$OSTYPE" == "darwin"* ]] && screencapture -x -T 0 /tmp/test_$$.png 2>/dev/null; then
rm -f /tmp/test_$$.png
echo "π Ready to debug!"
else
echo "β οΈ Some issues found. Review output above."
fi
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |