@@ -5,6 +5,7 @@ use crate::{
55};
66use anyhow::anyhow;
77pub use log::{error, info};
8+use serde::{Deserialize, Serialize};
89use std::{
910 collections::HashMap,
1011 net::{IpAddr, Ipv4Addr, SocketAddr},
@@ -20,6 +21,13 @@ use tokio::{
2021 time,
2122};
2223
24+// Different workarounds for adapters' differences
25+#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
26+pub struct DebuggerQuirks {
27+ #[serde(default)]
28+ pub absolute_paths: bool,
29+}
30+
2331#[derive(Debug)]
2432pub struct Client {
2533 id: usize,
@@ -34,6 +42,7 @@ pub struct Client {
3442 /// Currently active frame for the current thread.
3543 pub active_frame: Option<usize>,
3644 pub breakpoints: Vec<Breakpoint>,
45+ pub quirks: DebuggerQuirks,
3746}
3847
3948impl Client {
@@ -45,6 +54,9 @@ impl Client {
4554 port_arg: Option<String>,
4655 id: usize,
4756 ) -> Result<(Self, UnboundedReceiver<Payload>)> {
57+ if command == "" {
58+ return Result::Err(Error::Other(anyhow!("Command not provided")));
59+ }
4860 if transport == "tcp" && port_arg.is_some() {
4961 Self::tcp_process(
5062 &command,
@@ -82,6 +94,7 @@ impl Client {
8294 thread_id: None,
8395 active_frame: None,
8496 breakpoints: vec![],
97+ quirks: DebuggerQuirks::default(),
8598 };
8699
87100 tokio::spawn(Self::recv(server_rx, client_rx));