diff --git a/crates/re_ui/src/command.rs b/crates/re_ui/src/command.rs index 726feb074d62..1bc14f177bb5 100644 --- a/crates/re_ui/src/command.rs +++ b/crates/re_ui/src/command.rs @@ -56,6 +56,8 @@ pub enum UICommand { // Dev-tools: #[cfg(not(target_arch = "wasm32"))] ScreenshotWholeApp, + #[cfg(not(target_arch = "wasm32"))] + PrintDatastore, } impl UICommand { @@ -143,6 +145,11 @@ impl UICommand { "Screenshot", "Copy screenshot of the whole app to clipboard", ), + #[cfg(not(target_arch = "wasm32"))] + UICommand::PrintDatastore => ( + "Print datastore", + "Prints the entire data store to the console. WARNING: this may be A LOT of text.", + ), } } @@ -207,6 +214,8 @@ impl UICommand { #[cfg(not(target_arch = "wasm32"))] UICommand::ScreenshotWholeApp => None, + #[cfg(not(target_arch = "wasm32"))] + UICommand::PrintDatastore => None, } } diff --git a/crates/re_viewer/src/app.rs b/crates/re_viewer/src/app.rs index d06994570346..eeb2a3cec40d 100644 --- a/crates/re_viewer/src/app.rs +++ b/crates/re_viewer/src/app.rs @@ -405,6 +405,14 @@ impl App { UICommand::ScreenshotWholeApp => { self.screenshotter.request_screenshot(); } + #[cfg(not(target_arch = "wasm32"))] + UICommand::PrintDatastore => { + if let Some(ctx) = store_context { + if let Some(recording) = ctx.recording { + eprintln!("{}", recording.entity_db.data_store); + } + } + } } }