debugger: Add close button and coloring to debug panel session's menu (#28310)

This PR adds colors to debug panel's session menu that indicate the
state of each respective session. It also adds a close button to each
entry.

green - running
yellow - stopped
red - terminated/ended 


Release Notes:

- N/A
This commit is contained in:
Anthony Eid 2025-04-08 12:35:33 -04:00 committed by GitHub
parent ee7b1ec7f2
commit 1774cad933
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 173 additions and 44 deletions

View file

@ -832,7 +832,12 @@ pub enum SessionEvent {
Threads,
}
pub(crate) enum SessionStateEvent {
Shutdown,
}
impl EventEmitter<SessionEvent> for Session {}
impl EventEmitter<SessionStateEvent> for Session {}
// local session will send breakpoint updates to DAP for all new breakpoints
// remote side will only send breakpoint updates when it is a breakpoint created by that peer
@ -1553,6 +1558,8 @@ impl Session {
)
};
cx.emit(SessionStateEvent::Shutdown);
cx.background_spawn(async move {
let _ = task.await;
})