extension: Add debug_adapters to extension manifest (#30676)
Also pass worktree to the get_dap_binary. Release Notes: - N/A
This commit is contained in:
parent
b1c7fa1dac
commit
a092e2dc03
26 changed files with 147 additions and 59 deletions
|
@ -8,7 +8,7 @@ use dap::{
|
|||
};
|
||||
use gpui::{AsyncApp, SharedString};
|
||||
use language::LanguageName;
|
||||
use std::path::PathBuf;
|
||||
use std::{path::PathBuf, sync::Arc};
|
||||
use util::command::new_smol_command;
|
||||
|
||||
use crate::ToDap;
|
||||
|
@ -32,7 +32,7 @@ impl DebugAdapter for RubyDebugAdapter {
|
|||
|
||||
async fn get_binary(
|
||||
&self,
|
||||
delegate: &dyn DapDelegate,
|
||||
delegate: &Arc<dyn DapDelegate>,
|
||||
definition: &DebugTaskDefinition,
|
||||
_user_installed_path: Option<PathBuf>,
|
||||
_cx: &mut AsyncApp,
|
||||
|
@ -40,7 +40,7 @@ impl DebugAdapter for RubyDebugAdapter {
|
|||
let adapter_path = paths::debug_adapters_dir().join(self.name().as_ref());
|
||||
let mut rdbg_path = adapter_path.join("rdbg");
|
||||
if !delegate.fs().is_file(&rdbg_path).await {
|
||||
match delegate.which("rdbg".as_ref()) {
|
||||
match delegate.which("rdbg".as_ref()).await {
|
||||
Some(path) => rdbg_path = path,
|
||||
None => {
|
||||
delegate.output_to_console(
|
||||
|
@ -76,7 +76,7 @@ impl DebugAdapter for RubyDebugAdapter {
|
|||
format!("--port={}", port),
|
||||
format!("--host={}", host),
|
||||
];
|
||||
if delegate.which(launch.program.as_ref()).is_some() {
|
||||
if delegate.which(launch.program.as_ref()).await.is_some() {
|
||||
arguments.push("--command".to_string())
|
||||
}
|
||||
arguments.push(launch.program);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue