CrabNebula DevTools
CrabNebula 提供了一个免费的 DevTools 应用,用于 Tauri,这是其与 Tauri 项目合作的一部分。该应用允许你通过捕获 Tauri 应用的嵌入资源、Tauri 配置文件、日志和跨度来对你的 Tauri 应用进行检测,并提供一个网页前端以实现实时无缝数据可视化。
使用 CrabNebula DevTools,你可以检查应用的日志事件(包括来自依赖的日志),跟踪命令调用的性能和整体 Tauri API 使用情况,并为 Tauri 事件和命令提供特殊界面,包括有效负载、响应和内部日志以及执行跨度。
🌐 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.
要启用 CrabNebula DevTools,请安装 devtools crate:
🌐 To enable the CrabNebula DevTools, install the devtools crate:
cargo add tauri-plugin-devtools@2.0.0并尽快在你的主要功能中初始化插件:
🌐 And initialize the plugin as soon as possible in your main function:
fn main() { // 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); }
builder .run(tauri::generate_context!()) .expect("error while running tauri application");}然后照常运行你的应用,如果一切设置正确,devtools 将打印以下消息:
🌐 And then run your app as usual, if everything is set up correctly devtools will print the following message:
欲了解更多信息,请参阅 CrabNebula 开发者工具 文档。
🌐 For more information, see the CrabNebula DevTools documentation.
Tauri 中文网 - 粤ICP备13048890号
Nodejs.cn 旗下网站