Skip to content

Get Started

DevTools consists of a Rust crate to instrument your Tauri app and a web-based graphical user interface to visualize and explore the data captured by the instrumentation. The CrabNebula DevTools is a different Rust crate depending on which version of Tauri you’re at.

Tauri VersionDevTools Cratecrates.io
v1devtoolsdocs
v2tauri-plugin-devtoolsdocs

sh frame="none" cargo add tauri-plugin-devtools

With the crate added to your dependencies, you can now initialize and register the plugin with Tauri. It is strongly recommended to only enable the DevTools in development builds, not only because it won’t be useful to your users but also because it may conflict to any other logging system / tooling your app may have.

In the following snippet we use them to disable the CrabNebula DevTools in “non-debug” builds. So except for when you build for production through tauri build (prepended by your package manager) or cargo build --release.

./src-tauri/src/lib.rs
#[cfg_attr(mobile, tauri::mobile_entry_point)]
fn run() {
#[cfg(debug_assertions)]
let builder = tauri::Builder::default().plugin(tauri_plugin_devtools::init());
#[cfg(not(debug_assertions))]
let builder = tauri::Builder::default();
builder.run(tauri::generate_context!())
.expect("error while running tauri application");
}

DevTools Premium

CrabNebula DevTools Premium is a desktop application that offers extended functionality.

Installation

You can download the desktop application from here. It is a packaged Tauri application that can connect to your own Tauri application to instrument it.

Usage

The CrabNebula DevTools desktop application has 2 modes:

  1. Standalone: this is a standalone Tauri v2 app. It connects to any app with the the tauri-plugin-devtools plugin enabled.
  2. Embedded: the plugin is embedded as a secondary WebView in your own app. It opens as a dettachable drawer.

To achieve this, you need to add the tauri-plugin-devtools-app crate to your dependencies.

cargo add tauri-plugin-devtools tauri-plugin-devtools-app

Then you can initialize and register the plugin with Tauri.

./src-tauri/src/lib.rs
fn run() {
let builder = tauri::Builder::default();
#[cfg(debug_assertions)]
let builder = builder.plugin(tauri_plugin_devtools::init()).plugin(tauri_plugin_devtools_app::init());
builder
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

Once setup is done and your app is running, right-click on the window and select the “Open DevTools” menu. Or use the appropriate keyboard shortcut depending on your operating system:

  • Linux / Windows: Ctrl + Shift + M.
  • MacOS: Cmd + Shift + M.