Change summary
crates/debugger_ui/Cargo.toml | 4 ++--
crates/debugger_ui/src/debugger_panel.rs | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
Detailed changes
@@ -16,13 +16,13 @@ doctest = false
test-support = [
"dap/test-support",
"dap_adapters/test-support",
+ "debugger_tools/test-support",
"editor/test-support",
"gpui/test-support",
"project/test-support",
"util/test-support",
"workspace/test-support",
"unindent",
- "debugger_tools"
]
[dependencies]
@@ -69,7 +69,7 @@ ui.workspace = true
util.workspace = true
workspace.workspace = true
workspace-hack.workspace = true
-debugger_tools = { workspace = true, optional = true }
+debugger_tools.workspace = true
unindent = { workspace = true, optional = true }
zed_actions.workspace = true
@@ -622,6 +622,14 @@ impl DebugPanel {
.on_click(move |_, _, cx| cx.open_url("https://zed.dev/docs/debugger"))
.tooltip(Tooltip::text("Open Documentation"))
};
+ let logs_button = || {
+ IconButton::new("debug-open-logs", IconName::ScrollText)
+ .icon_size(IconSize::Small)
+ .on_click(move |_, window, cx| {
+ window.dispatch_action(debugger_tools::OpenDebugAdapterLogs.boxed_clone(), cx)
+ })
+ .tooltip(Tooltip::text("Open Debug Adapter Logs"))
+ };
Some(
div.border_b_1()
@@ -873,6 +881,7 @@ impl DebugPanel {
.justify_around()
.when(is_side, |this| {
this.child(new_session_button())
+ .child(logs_button())
.child(documentation_button())
}),
)
@@ -922,6 +931,7 @@ impl DebugPanel {
))
.when(!is_side, |this| {
this.child(new_session_button())
+ .child(logs_button())
.child(documentation_button())
}),
),