debug-tauri
TauriアプリのWebViewデバッグを、公式プラグインや自動スクリーンショット、コンソールログ分析などを活用して効率化し、プロセス検証や状態分析も行いながら、UIの問題やランタイムエラーを解決するSkill。
📜 元の英語説明(参考)
Automates 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.
🇯🇵 日本人クリエイター向け解説
TauriアプリのWebViewデバッグを、公式プラグインや自動スクリーンショット、コンソールログ分析などを活用して効率化し、プロセス検証や状態分析も行いながら、UIの問題やランタイムエラーを解決するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o debug-tauri.zip https://jpskill.com/download/16848.zip && unzip -o debug-tauri.zip && rm debug-tauri.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/16848.zip -OutFile "$d\debug-tauri.zip"; Expand-Archive "$d\debug-tauri.zip" -DestinationPath $d -Force; ri "$d\debug-tauri.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
debug-tauri.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
debug-tauriフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 11
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
Tauri WebView デバッガー
tauri-plugin-debug-tools を使用した Tauri アプリケーションの自動デバッグワークフローと、公式プラグインの統合。
前提条件
- tauri-plugin-debug-tools がインストールされ、登録されていること
- tauri-plugin-log (v2.0+): 自動コンソール収集のための公式ロギングプラグイン
- tauri-plugin-screenshots (v2.0+): クロスプラットフォームのスクリーンショットキャプチャ
- デバッグ権限が有効になっていること:
debug-tools:default,log:default,screenshots:default - フロントエンドロガーが
attachConsole()を介して初期化されていること (自動ログ転送に推奨)
クイックスタート
TAURI_APP_NAME=<app-binary-name> scripts/capture.sh を実行して、プロセスを確認し、スクリーンショットをキャプチャします。
プロセスが見つからない場合は、開発サーバー (例: tauri dev) を起動して再試行してください。
デバッグワークフロー
このチェックリストをコピーして、進捗状況を追跡します。
デバッグの進捗状況:
- [ ] ステップ 1: プロセスのステータスを確認する
- [ ] ステップ 2: スクリーンショットをキャプチャする
- [ ] ステップ 3: コンソールログを収集する
- [ ] ステップ 4: WebView の状態をキャプチャする
- [ ] ステップ 5: 調査結果を分析する
- [ ] ステップ 6: デバッグレポートを生成する
- [ ] ステップ 7: 修正案を提案する
ステップ 1: プロセスのステータスを確認する
実行: TAURI_APP_NAME=<your-app> scripts/capture.sh
これは、アプリが実行されているかどうかを確認し、最初のスクリーンショットをキャプチャします。
ステップ 2: スクリーンショットをキャプチャする
Plugin API 経由 (推奨):
import { captureMainWindow } from "tauri-plugin-debug-tools/screenshotHelper";
const imagePath = await captureMainWindow();
レガシー: capture.sh スクリプト (macOS screencapture)。詳細については、SCREENSHOTS.md を参照してください。
ステップ 3: コンソールログを収集する
コンソールロガー (フロントエンド - 推奨):
consoleLogger は、フロントエンドのログとエラーをリングバッファに自動的に収集し、それらを一時ファイルにフラッシュします。
// 自動収集を初期化するために、アプリのエントリポイントでインポートします
import "tauri-plugin-debug-tools/consoleLogger";
// 明示的なロギングには debugTools を使用します
import { debugTools } from "tauri-plugin-debug-tools/consoleLogger";
debugTools.log("App started");
debugTools.error("Something went wrong");
consoleLogger ログファイルの検索:
import { invoke } from '@tauri-apps/api/core';
// 実際のログファイルのパスを取得します
const logPath = await invoke('plugin:debug-tools|reset_debug_logs');
console.log('Console logs stored at:', logPath);
プラットフォーム固有の consoleLogger の場所:
- macOS:
/tmp/tauri_console_logs_[app_name]_[pid].jsonl - Linux:
/tmp/tauri_console_logs_[app_name]_[pid].jsonl - Windows:
%TEMP%\tauri_console_logs_[app_name]_[pid].jsonl
ここで、[app_name] はアプリケーション名、[pid] はプロセス ID です。
バックエンドログ (tauri-plugin-log):
import { logger } from "tauri-plugin-debug-tools/logAdapter";
// アプリの起動時に一度初期化します
const detach = await logger.initialize();
// ログはプラットフォーム固有の場所に自動的に転送されます
logger.info("App started");
logger.error("Something went wrong");
バックエンドログの場所:
- macOS:
~/Library/Logs/{bundle_id}/debug.log - Linux:
~/.local/share/{bundle_id}/logs/debug.log - Windows:
{LOCALAPPDATA}\{bundle_id}\logs\debug.log
代替: debugBridge API を使用します。すべてのメソッドについては、IPC_COMMANDS.md を参照してください。
ステップ 4: WebView の状態をキャプチャする
import { captureWebViewState } from "tauri-plugin-debug-tools/debugBridge";
const state = await captureWebViewState();
戻り値: { url, title, user_agent, viewport }
ステップ 5: 調査結果を分析する
- 視覚: UI の問題、エラー、レイアウトの問題についてスクリーンショットを確認します
- ログ: エラー、警告、パターンを確認します
- 状態: URL、viewport、ユーザーエージェントを確認します
- パフォーマンス: メモリリーク、高い CPU 使用率を確認します
ステップ 6: デバッグレポートを生成する
REPORT_TEMPLATE.md のテンプレートを使用します。
ステップ 7: 修正案を提案する
収集された証拠に基づいて:
- 根本原因を特定します
- 特定のコード変更を提案します
- 実装手順を提供します
参考文献
IPC コマンド: IPC_COMMANDS.md - コンソールログ、WebView の状態、デバッグコマンド スクリーンショット: SCREENSHOTS.md - キャプチャ方法とトラブルシューティング トラブルシューティング: TROUBLESHOOTING.md - 一般的なエラーと解決策 レポートテンプレート: REPORT_TEMPLATE.md - 構造化されたデバッグレポート形式
レガシーリファレンス: REFERENCE.md には結合されたドキュメントが含まれています (非推奨になります)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Tauri WebView Debugger
Automated debugging workflow for Tauri applications using tauri-plugin-debug-tools with official plugin integration.
Prerequisites
- tauri-plugin-debug-tools installed and registered
- tauri-plugin-log (v2.0+): Official logging plugin for automatic console collection
- tauri-plugin-screenshots (v2.0+): Cross-platform screenshot capture
- Debug permissions enabled:
debug-tools:default,log:default,screenshots:default - Frontend logger initialized via
attachConsole()(recommended for automatic log forwarding)
Quick Start
Run TAURI_APP_NAME=<app-binary-name> scripts/capture.sh to verify process and capture screenshot.
If process not found, start your dev server (e.g., tauri dev) and retry.
Debug Workflow
Copy this checklist to track progress:
Debug Progress:
- [ ] Step 1: Verify process status
- [ ] Step 2: Capture screenshot
- [ ] Step 3: Collect console logs
- [ ] Step 4: Capture WebView state
- [ ] Step 5: Analyze findings
- [ ] Step 6: Generate debug report
- [ ] Step 7: Propose fixes
Step 1: Verify Process Status
Run: TAURI_APP_NAME=<your-app> scripts/capture.sh
This checks if the app is running and captures an initial screenshot.
Step 2: Capture Screenshot
Via Plugin API (Recommended):
import { captureMainWindow } from "tauri-plugin-debug-tools/screenshotHelper";
const imagePath = await captureMainWindow();
Legacy: capture.sh script (macOS screencapture). See SCREENSHOTS.md for details.
Step 3: Collect Console Logs
Console Logger (Frontend - Recommended):
The consoleLogger automatically collects frontend logs and errors in a ring buffer and flushes them to a temp file.
// Import at app entry point to initialize automatic collection
import "tauri-plugin-debug-tools/consoleLogger";
// Use debugTools for explicit logging
import { debugTools } from "tauri-plugin-debug-tools/consoleLogger";
debugTools.log("App started");
debugTools.error("Something went wrong");
Finding consoleLogger Log Files:
import { invoke } from '@tauri-apps/api/core';
// Get actual log file path
const logPath = await invoke('plugin:debug-tools|reset_debug_logs');
console.log('Console logs stored at:', logPath);
Platform-specific consoleLogger locations:
- macOS:
/tmp/tauri_console_logs_[app_name]_[pid].jsonl - Linux:
/tmp/tauri_console_logs_[app_name]_[pid].jsonl - Windows:
%TEMP%\tauri_console_logs_[app_name]_[pid].jsonl
Where [app_name] is the application name and [pid] is the process ID.
Backend Logs (tauri-plugin-log):
import { logger } from "tauri-plugin-debug-tools/logAdapter";
// Initialize once at app startup
const detach = await logger.initialize();
// Logs auto-forwarded to platform-specific location
logger.info("App started");
logger.error("Something went wrong");
Backend log locations:
- macOS:
~/Library/Logs/{bundle_id}/debug.log - Linux:
~/.local/share/{bundle_id}/logs/debug.log - Windows:
{LOCALAPPDATA}\{bundle_id}\logs\debug.log
Alternative: Use debugBridge API. See IPC_COMMANDS.md for all methods.
Step 4: Capture WebView State
import { captureWebViewState } from "tauri-plugin-debug-tools/debugBridge";
const state = await captureWebViewState();
Returns: { url, title, user_agent, viewport }
Step 5: Analyze Findings
- Visual: Check screenshot for UI issues, errors, layout problems
- Logs: Review errors, warnings, patterns
- State: Verify URL, viewport, user agent
- Performance: Check for memory leaks, high CPU usage
Step 6: Generate Debug Report
Use template in REPORT_TEMPLATE.md.
Step 7: Propose Fixes
Based on collected evidence:
- Identify root cause
- Suggest specific code changes
- Provide implementation steps
References
IPC Commands: IPC_COMMANDS.md - Console logs, WebView state, debug commands Screenshots: SCREENSHOTS.md - Capture methods and troubleshooting Troubleshooting: TROUBLESHOOTING.md - Common errors and solutions Report Template: REPORT_TEMPLATE.md - Structured debug report format
Legacy reference: REFERENCE.md contains combined documentation (will be deprecated)
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (4,870 bytes)
- 📎 references/IPC_COMMANDS.md (3,976 bytes)
- 📎 references/LOGGING.md (4,899 bytes)
- 📎 references/MIGRATION.md (10,651 bytes)
- 📎 references/REFERENCE.md (4,359 bytes)
- 📎 references/REPORT_TEMPLATE.md (3,210 bytes)
- 📎 references/SCREENSHOTS.md (4,083 bytes)
- 📎 references/TROUBLESHOOTING.md (2,840 bytes)
- 📎 scripts/analyze_logs.sh (3,734 bytes)
- 📎 scripts/capture.sh (2,471 bytes)
- 📎 scripts/validate_setup.sh (5,059 bytes)