Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 15 additions & 4 deletions src/content/docs/develop/Debug/crabnebula-devtools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ sidebar:
variant: tip
---

import { Image } from 'astro:assets';
import devToolsPrint from '@assets/develop/Debug/crabnebula-devtools.png';

[CrabNebula](https://crabnebula.dev/) provides a free [DevTools](https://crabnebula.dev/devtools/) application for Tauri as part of its partnership with the Tauri project. This application allows you to instrument your Tauri app by capturing its embedded assets, Tauri configuration file, logs and spans and providing a web frontend to seamlessly visualize data in real time.

With the CrabNebula DevTools you can inspect your app's log events (including logs from dependencies), track down the performance of your command calls and overall Tauri API usage, with a special interface for Tauri events and commands, including payload, responses and inner logs and execution spans.
Expand All @@ -20,19 +23,27 @@ And initialize the plugin as soon as possible in your main function:

```rust
fn main() {
#[cfg(debug_assertions)]
let devtools = tauri_plugin_devtools::init(); // initialize the plugin as early as possible
// This should be called as early in the execution of the app as possible
#[cfg(debug_assertions)] // only enable instrumentation in development builds
let devtools = tauri_plugin_devtools::init();

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

#[cfg(debug_assertions)]
builder = builder.plugin(devtools); // then register it with Tauri
{
builder = builder.plugin(devtools);
}

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

And then run your app as usual, if everything is set up correctly devtools will print the following message:

<Image src={devToolsPrint} alt="DevTools message on terminal" />

:::note
In this case we only initialize the devtools plugin for debug applications, which is recommended.
:::
Expand Down