# debugger: Fix breakpoint list not showing breakpoints in single files \(\#63348\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/aa347c3025c215cb22e187f1b98838807f432a4f)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: aa347c3025c215cb22e187f1b98838807f432a4f

Requested commit: aa347c3025c215cb22e187f1b98838807f432a4f

Commit: aa347c3025c215cb22e187f1b98838807f432a4f

Tree: 53009891a029b425fd89383f06f6891a1f0390a7

Author: Casey Avila

Committer: GitHub

## Message

```
debugger: Fix breakpoint list not showing breakpoints in single files (#63348)

# Objective

- Currently there is a bug where breakpoints in single files (not in
folder/worktree) are not shown in the debug panel breakpoint list. They
visually make the breakpoint list empty
- This is because we try to create a `RelPath` from `breakpoint.path`,
which is an absolute path

## Solution

- Create the fallback directory string in a valid way
- Because breakpoint directories can now be absolute, the first part of
the path isn't always the worktree root, so we can't blindly skip this
in the UI code anymore
- Instead, only prepend the worktree root if there multiple worktrees,
matching behavior of other UI elements. This simplifies the code overall

## Testing

- Manually tested

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase
Before:
<img width="978" height="645" alt="image"
src="https://github.com/user-attachments/assets/334176fd-3ad3-4bc7-b7bc-bf1568be6d76"
/>

After:
<img width="962" height="755" alt="image"
src="https://github.com/user-attachments/assets/e4259c7f-679b-4ac9-807e-d8787d43d067"
/>



---

Release Notes:

- Fixed breakpoint list not showing breakpoints in single files
```

## Parents

- [a61e2609c18d459a8f236cbbd0ce5a04a06d28da](https://git.cafe/gitcafe/zed/commit/a61e2609c18d459a8f236cbbd0ce5a04a06d28da?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/aa347c3025c215cb22e187f1b98838807f432a4f?format=markdown)
