debugger_ui: Show a toast when setting breakpoints fails (#28815)
Release Notes: - N/A --------- Co-authored-by: Anthony Eid <hello@anthonyeid.me> Co-authored-by: Anthony <anthony@zed.dev>
This commit is contained in:
parent
80a2f71d8e
commit
4095011af5
4 changed files with 101 additions and 32 deletions
|
@ -1462,7 +1462,7 @@ impl Project {
|
|||
config: DebugTaskDefinition,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Task<Result<Entity<Session>>> {
|
||||
let Some(worktree) = self.worktrees(cx).next() else {
|
||||
let Some(worktree) = self.worktrees(cx).find(|tree| tree.read(cx).is_visible()) else {
|
||||
return Task::ready(Err(anyhow!("Failed to find a worktree")));
|
||||
};
|
||||
|
||||
|
@ -1501,7 +1501,7 @@ impl Project {
|
|||
let ret = this
|
||||
.update(cx, |project, cx| {
|
||||
project.dap_store.update(cx, |dap_store, cx| {
|
||||
dap_store.new_session(binary, config, None, cx)
|
||||
dap_store.new_session(binary, config, worktree.downgrade(), None, cx)
|
||||
})
|
||||
})?
|
||||
.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue