debugger: Fix Rust debugger runnable (#28801)
We ran the locator after configuring the debugger binary which cause the binary to never use the configuration from the cargo locator. This PR fixes this by correcting the order of configuration. co-authored-by Anthony Eid <anthony@zed.dev> Release Notes: - N/A --------- Co-authored-by: piotr <piotr@zed.dev>
This commit is contained in:
parent
dad6067e18
commit
e34fee55a0
3 changed files with 30 additions and 47 deletions
|
@ -1482,6 +1482,18 @@ impl Project {
|
|||
.update(cx, |dap_store, cx| dap_store.delegate(&worktree, cx))
|
||||
})?;
|
||||
|
||||
let task = this.update(cx, |project, cx| {
|
||||
project.dap_store.read(cx).as_local().and_then(|local| {
|
||||
config.locator.is_some().then(|| {
|
||||
local.locate_binary(config.clone(), cx.background_executor().clone())
|
||||
})
|
||||
})
|
||||
})?;
|
||||
let config = if let Some(task) = task {
|
||||
task.await
|
||||
} else {
|
||||
config
|
||||
};
|
||||
let binary = adapter
|
||||
.get_binary(&delegate, &config, user_installed_path, cx)
|
||||
.await?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue