debugger: Enable setting debug panel dock position to the side (#29914)

### Preview
<img width="301" alt="Screenshot 2025-05-05 at 11 08 43 PM"
src="https://github.com/user-attachments/assets/aa445117-1c1c-4d90-a3bb-049f8417eca4"
/>


Setups the ground work to write debug panel persistence tests and allows
users to change the dock position of the debug panel.


Release Notes:

- N/A
This commit is contained in:
Anthony Eid 2025-05-05 17:27:20 -04:00 committed by GitHub
parent 6e28400e17
commit 1aa92d9928
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 590 additions and 302 deletions

View file

@ -3,7 +3,9 @@ pub mod running;
use std::sync::OnceLock;
use dap::client::SessionId;
use gpui::{App, Entity, EventEmitter, FocusHandle, Focusable, Subscription, Task, WeakEntity};
use gpui::{
App, Axis, Entity, EventEmitter, FocusHandle, Focusable, Subscription, Task, WeakEntity,
};
use project::Project;
use project::debugger::session::Session;
use project::worktree_store::WorktreeStore;
@ -15,8 +17,7 @@ use workspace::{
item::{self, Item},
};
use crate::debugger_panel::DebugPanel;
use crate::persistence::SerializedPaneLayout;
use crate::{debugger_panel::DebugPanel, persistence::SerializedLayout};
pub struct DebugSession {
remote_id: Option<workspace::ViewId>,
@ -40,7 +41,8 @@ impl DebugSession {
workspace: WeakEntity<Workspace>,
session: Entity<Session>,
_debug_panel: WeakEntity<DebugPanel>,
serialized_pane_layout: Option<SerializedPaneLayout>,
serialized_layout: Option<SerializedLayout>,
dock_axis: Axis,
window: &mut Window,
cx: &mut App,
) -> Entity<Self> {
@ -49,7 +51,8 @@ impl DebugSession {
session.clone(),
project.clone(),
workspace.clone(),
serialized_pane_layout,
serialized_layout,
dock_axis,
window,
cx,
)