debugger: Add Debug Panel context menu (#28847)

This PR adds a debug panel context menu that will allow a user to select
which debug session items are visible.

The context menu will add to the pane that was right clicked on.

<img width="1275" alt="Screenshot 2025-04-16 at 2 43 36 AM"
src="https://github.com/user-attachments/assets/330322ff-69db-4731-bbaf-3544d53f2f15"
/>


Release Notes:

- N/A
This commit is contained in:
Anthony Eid
2025-04-16 08:36:51 +00:00
committed by GitHub
parent 320abe9b22
commit 4efabe17dd
5 changed files with 287 additions and 19 deletions
@@ -3,7 +3,7 @@ use project::debugger::session::{Session, SessionEvent};
use ui::prelude::*;
use util::maybe;
pub struct LoadedSourceList {
pub(crate) struct LoadedSourceList {
list: ListState,
invalidate: bool,
focus_handle: FocusHandle,
@@ -194,6 +194,10 @@ impl VariableList {
}
}
pub(super) fn has_open_context_menu(&self) -> bool {
self.open_context_menu.is_some()
}
fn build_entries(&mut self, cx: &mut Context<Self>) {
let Some(stack_frame_id) = self.selected_stack_frame_id else {
return;