Token导航 LogoToken导航TokenDH.com
前端设计执行命令github未标认证来源可访问clear审计异常

debugging-tauri-apps调试 Tauri apps

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

2,067

周安装

75

GitHub Stars

18

下载量

754
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:debugging-tauri-apps(调试 Tauri apps)
来源仓库:https://github.com/dchuk/claude-code-tauri-skills
仓库路径:skills/debugging-tauri-apps
安装命令:
npx skills add https://github.com/dchuk/claude-code-tauri-skills --skill debugging-tauri-apps
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/dchuk/claude-code-tauri-skills --skill debugging-tauri-apps

简介

该技能覆盖 Tauri v2 应用的控制台调试与 WebView 检查方法。

  • 适用于桌面应用开发中的条件编译、调试构建与 DevTools 配置。
  • 通过 GitHub 仓库安装,需使用 #[cfg(dev)] 排除生产环境的调试代码。
  • 建议结合 CrabNebula DevTools 进行运行时行为分析。
  • debugging-tauri-apps 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Debugging Tauri Applications

This skill covers debugging Tauri v2 applications including console debugging, WebView inspection, IDE configurations, and CrabNebula DevTools.

Development-Only Code

Use conditional compilation to exclude debug code from production builds:

// Only runs during `tauri dev`
#[cfg(dev)]
{
    // Development-only code
}

// Runtime check
if cfg!(dev) {
    // tauri dev code
} else {
    // tauri build code
}

// Programmatic check
let is_dev: bool = tauri::is_dev();

// Debug builds and `tauri build --debug`
#[cfg(debug_assertions)]
{
    // Debug-only code
}

Console Debugging

Rust Print Macros

Print messages to the terminal where tauri dev runs:

println!("Message from Rust: {}", msg);
dbg!(&variable);  // Prints variable with file:line info

Enable Backtraces

For detailed error information:

# Linux/macOS
RUST_BACKTRACE=1 tauri dev

# Windows PowerShell
$env:RUST_BACKTRACE=1
tauri dev

WebView DevTools

Opening DevTools

  • Right-click and select "Inspect Element"
  • Ctrl + Shift + i (Linux/Windows)
  • Cmd + Option + i (macOS)

Platform-specific inspectors: WebKit (Linux), Safari (macOS), Edge DevTools (Windows).

Programmatic Control

tauri::Builder::default()
    .setup(|app| {
        #[cfg(debug_assertions)]
        {
            let window = app.get_webview_window("main").unwrap();
            window.open_devtools();
            // window.close_devtools();
        }
        Ok(())
    })

Production DevTools

Create a debug build for testing:

tauri build --debug

To permanently enable devtools in production, add to src-tauri/Cargo.toml:

[dependencies]
tauri = { version = "...", features = ["...", "devtools"] }
WARNING: Using the devtools feature enables private macOS APIs that prevent App Store acceptance.

VS Code Setup

Required Extensions

ExtensionPlatformPurpose
vscode-lldbAllLLDB debugger
C/C++WindowsVisual Studio debugger

launch.json Configuration

Create .vscode/launch.json:

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "lldb",
      "request": "launch",
      "name": "Tauri Development Debug",
      "cargo": {
        "args": [
          "build",
          "--manifest-path=./src-tauri/Cargo.toml",
          "--no-default-features"
        ]
      },
      "preLaunchTask": "ui:dev"
    },
    {
      "type": "lldb",
      "request": "launch",
      "name": "Tauri Production Debug",
      "cargo": {
        "args": [
          "build",
          "--release",
          "--manifest-path=./src-tauri/Cargo.toml"
        ]
      },
      "preLaunchTask": "ui:build"
    }
  ]
}

Windows Visual Studio Debugger

For faster Windows debugging with better enum support:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch App Debug",
      "type": "cppvsdbg",
      "request": "launch",
      "program": "${workspaceRoot}/src-tauri/target/debug/your-app-name.exe",
      "cwd": "${workspaceRoot}",
      "preLaunchTask": "dev"
    }
  ]
}

tasks.json Configuration

Create .vscode/tasks.json:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "ui:dev",
      "type": "shell",
      "isBackground": true,
      "command": "npm",
      "args": ["run", "dev"]
    },
    {
      "label": "ui:build",
      "type": "shell",
      "command": "npm",
      "args": ["run", "build"]
    },
    {
      "label": "build:debug",
      "type": "cargo",
      "command": "build",
      "options": {
        "cwd": "${workspaceRoot}/src-tauri"
      }
    },
    {
      "label": "dev",
      "dependsOn": ["build:debug", "ui:dev"],
      "group": {
        "kind": "build"
      }
    }
  ]
}

Debugging Workflow

  1. Set breakpoints by clicking the line number margin in Rust files
  2. Press F5 or select debug configuration from Run menu
  3. The preLaunchTask runs the dev server automatically
  4. Debugger attaches and stops at breakpoints
NOTE: LLDB bypasses the Tauri CLI, so beforeDevCommand and beforeBuildCommand must be configured as tasks.

RustRover / IntelliJ Setup

Project Configuration

If your project lacks a top-level Cargo.toml, create a workspace file:

[workspace]
members = ["src-tauri"]

Or attach src-tauri/Cargo.toml via the Cargo tool window.

Run Configurations

Create two configurations in Run | Edit Configurations:

1. Tauri App Configuration (Cargo)

  • Command: run
  • Additional arguments: --no-default-features

The --no-default-features flag is critical - it tells Tauri to load assets from the dev server instead of bundling them.

2. Development Server Configuration

For Node-based projects:

  • Create an npm Run Configuration
  • Set package manager (npm/pnpm/yarn)
  • Set script to dev

For Rust WASM (Trunk):

  • Create a Shell Script configuration
  • Command: trunk serve

Debugging Workflow

  1. Start the development server configuration first
  2. Click Debug on the Tauri App configuration
  3. RustRover halts at Rust breakpoints automatically
  4. Inspect variables and step through code

Neovim Setup

Required Plugins

  • nvim-dap - Debug Adapter Protocol client
  • nvim-dap-ui - Debugger UI
  • nvim-nio - Async dependency for nvim-dap-ui
  • overseer.nvim (recommended) - Task management

Prerequisites

Download codelldb from GitHub releases and note the installation path.

DAP Configuration

Add to your Neovim config (init.lua or equivalent):

local dap = require("dap")

-- Configure codelldb adapter
dap.adapters.codelldb = {
  type = 'server',
  port = "${port}",
  executable = {
    command = '/path/to/codelldb/adapter/codelldb',
    args = {"--port", "${port}"},
  }
}

-- Launch configuration for Rust/Tauri
dap.configurations.rust = {
  {
    name = "Launch Tauri App",
    type = "codelldb",
    request = "launch",
    program = function()
      return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/target/debug/', 'file')
    end,
    cwd = '${workspaceFolder}',
    stopOnEntry = false
  },
}

UI Integration

local dapui = require("dapui")
dapui.setup()

-- Auto-open/close UI
dap.listeners.before.attach.dapui_config = function()
  dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
  dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
  dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
  dapui.close()
end

Visual Indicators

vim.fn.sign_define('DapBreakpoint', {
  text = 'B',
  texthl = 'DapBreakpoint',
  linehl = '',
  numhl = ''
})
vim.fn.sign_define('DapStopped', {
  text = '>',
  texthl = 'DapStopped',
  linehl = 'DapStopped',
  numhl = ''
})

Keybindings

vim.keymap.set('n', '<F5>', function() dap.continue() end)
vim.keymap.set('n', '<F6>', function() dap.disconnect({ terminateDebuggee = true }) end)
vim.keymap.set('n', '<F10>', function() dap.step_over() end)
vim.keymap.set('n', '<F11>', function() dap.step_into() end)
vim.keymap.set('n', '<F12>', function() dap.step_out() end)
vim.keymap.set('n', '<Leader>b', function() dap.toggle_breakpoint() end)
vim.keymap.set('n', '<Leader>o', function() overseer.toggle() end)
vim.keymap.set('n', '<Leader>R', function() overseer.run_template() end)

Development Server Task

Create .vscode/tasks.json for overseer.nvim compatibility:

{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "process",
      "label": "dev server",
      "command": "npm",
      "args": ["run", "dev"],
      "isBackground": true,
      "presentation": {
        "revealProblems": "onProblem"
      },
      "problemMatcher": {
        "pattern": {
          "regexp": "^error:.*",
          "file": 1,
          "line": 2
        },
        "background": {
          "activeOnStart": false,
          "beginsPattern": ".*Rebuilding.*",
          "endsPattern": ".*listening.*"
        }
      }
    }
  ]
}
NOTE: The development server does not start automatically when bypassing Tauri CLI. Use overseer.nvim or start it manually.

CrabNebula DevTools

CrabNebula DevTools provides real-time application instrumentation including log inspection, performance monitoring, and Tauri event/command analysis.

Features

  • Inspect log events (including dependency logs)
  • Monitor command execution performance
  • Analyze Tauri events with payloads and responses
  • Real-time visualization

Installation

cargo add tauri-plugin-devtools@2.0.0

Setup

Initialize DevTools as early as possible in src-tauri/src/main.rs:

fn main() {
    // Initialize DevTools only in debug builds
    #[cfg(debug_assertions)]
    let devtools = tauri_plugin_devtools::init();

    let mut builder = tauri::Builder::default();

    #[cfg(debug_assertions)]
    {
        builder = builder.plugin(devtools);
    }

    builder
        .run(tauri::generate_context!())
        .expect("error while running tauri application")
}

Usage

When running tauri dev, DevTools automatically opens a web-based interface showing:

  • Application logs with filtering
  • IPC command calls with timing
  • Event payloads and responses
  • Performance spans

For full documentation, see CrabNebula DevTools docs.


Quick Reference

TaskCommand/Action
Enable backtracesRUST_BACKTRACE=1 tauri dev
Open WebView DevToolsCtrl+Shift+i / Cmd+Option+i
Debug buildtauri build --debug
Add DevTools plugincargo add tauri-plugin-devtools@2.0.0

IDE Comparison

FeatureVS CodeRustRoverNeovim
Extension/Pluginvscode-lldbBuilt-innvim-dap + codelldb
Windows AltcppvsdbgBuilt-incodelldb
Task Runnertasks.jsonRun configsoverseer.nvim
Setup ComplexityMediumLowHigh

Common Issues

  1. Breakpoints not hit: Ensure --no-default-features is set when building
  2. Dev server not starting: Configure preLaunchTask or start manually
  3. App not loading frontend: Dev server must be running before Tauri app starts
  4. Windows enum display issues: Use cppvsdbg instead of LLDB

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

31.2%
按下载量换算235

Gemini CLI

22.18%
按下载量换算167

Antigravity

17.41%
按下载量换算131

windsurf

11.77%
按下载量换算89

OpenCode

7.8%
按下载量换算59

Codex

3.49%
按下载量换算26

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/dchuk/claude-code-tauri-skills --skill debugging-tauri-apps;npx skills add dchuk/claude-code-tauri-skills --skill "debugging-tauri-apps" 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills