Detailed changes
@@ -436,7 +436,7 @@ impl DebugAdapter for CodeLldbDebugAdapter {
Ok(DebugAdapterBinary {
command: command.unwrap(),
- cwd: None,
+ cwd: Some(delegate.worktree_root_path().to_path_buf()),
arguments: vec![
"--settings".into(),
json!({"sourceLanguages": ["cpp", "rust"]}).to_string(),
@@ -184,7 +184,7 @@ impl DebugAdapter for GdbDebugAdapter {
command: gdb_path,
arguments: vec!["-i=dap".into()],
envs: HashMap::default(),
- cwd: None,
+ cwd: Some(delegate.worktree_root_path().to_path_buf()),
connection: None,
request_args,
})
@@ -347,7 +347,7 @@ impl DebugAdapter for GoDebugAdapter {
Ok(DebugAdapterBinary {
command: delve_path,
arguments: vec!["dap".into(), "--listen".into(), format!("{host}:{port}")],
- cwd: None,
+ cwd: Some(delegate.worktree_root_path().to_path_buf()),
envs: HashMap::default(),
connection: Some(adapters::TcpArguments {
host,
@@ -86,7 +86,7 @@ impl JsDebugAdapter {
port.to_string(),
host.to_string(),
],
- cwd: None,
+ cwd: Some(delegate.worktree_root_path().to_path_buf()),
envs: HashMap::default(),
connection: Some(adapters::TcpArguments {
host,
@@ -89,7 +89,7 @@ impl PhpDebugAdapter {
host,
timeout,
}),
- cwd: None,
+ cwd: Some(delegate.worktree_root_path().to_path_buf()),
envs: HashMap::default(),
request_args: StartDebuggingRequestArguments {
configuration: task_definition.config.clone(),
@@ -138,7 +138,7 @@ impl PythonDebugAdapter {
port,
timeout,
}),
- cwd: None,
+ cwd: Some(delegate.worktree_root_path().to_path_buf()),
envs: HashMap::default(),
request_args: self.request_args(config)?,
})