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

@ -4,6 +4,14 @@ use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use settings::{Settings, SettingsSources};
#[derive(Copy, Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq)]
#[serde(rename_all = "snake_case")]
pub enum DebugPanelDockPosition {
Left,
Bottom,
Right,
}
#[derive(Serialize, Deserialize, JsonSchema, Clone, Copy)]
#[serde(default)]
pub struct DebuggerSettings {
@ -31,6 +39,10 @@ pub struct DebuggerSettings {
///
/// Default: true
pub format_dap_log_messages: bool,
/// The dock position of the debug panel
///
/// Default: Bottom
pub dock: DebugPanelDockPosition,
}
impl Default for DebuggerSettings {
@ -42,6 +54,7 @@ impl Default for DebuggerSettings {
timeout: 2000,
log_dap_communications: true,
format_dap_log_messages: true,
dock: DebugPanelDockPosition::Bottom,
}
}
}