debugging-tauri-apps
Helps users debug Tauri v2 applications across VS Code, RustRover, IntelliJ, and Neovim. Covers console debugging, WebView DevTools, Rust backtrace, CrabNebula DevTools integration, and IDE-specific launch configurations.
What this skill does
# 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:
```rust
// 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:
```rust
println!("Message from Rust: {}", msg);
dbg!(&variable); // Prints variable with file:line info
```
### Enable Backtraces
For detailed error information:
```bash
# 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
```rust
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:
```bash
tauri build --debug
```
To permanently enable devtools in production, add to `src-tauri/Cargo.toml`:
```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
| Extension | Platform | Purpose |
|-----------|----------|---------|
| [vscode-lldb](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) | All | LLDB debugger |
| [C/C++](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) | Windows | Visual Studio debugger |
### launch.json Configuration
Create `.vscode/launch.json`:
```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:
```json
{
"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`:
```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:
```toml
[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](https://github.com/vadimcn/codelldb/releases) and note the installation path.
### DAP Configuration
Add to your Neovim config (init.lua or equivalent):
```lua
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
```lua
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
```lua
vim.fn.sign_define('DapBreakpoint', {
text = 'B',
texthl = 'DapBreakpoint',
linehl = '',
numhl = ''
})
vim.fn.sign_define('DapStopped', {
text = '>',
texthl = 'DapStopped',
linehl = 'DapStopped',
numhl = ''
})
```
### Keybindings
```lua
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:
```json
{
"version": "2.0.0",
"tasks": [
{
"type": "process",
"label": "dev server",
"command": "npm",
"args": ["run", "dev"],
"isBackground": true,
"presentation": {
"reRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.