# Fix unexpected argument ' ' upon trying to debug while cargo is indexing \(\#61241\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a5d1afa534aa3e0451b8debb3ae997a902d5ab52

Requested commit: a5d1afa534aa3e0451b8debb3ae997a902d5ab52

Commit: a5d1afa534aa3e0451b8debb3ae997a902d5ab52

Tree: 1a00087c18fdc37ebbac04e9445ffb0175f5957e

Author: Pingy

Committer: GitHub

## Message

```
Fix unexpected argument ' ' upon trying to debug while cargo is indexing (#61241)

# Objective
Fixes #47119

## Solution

Strip empty-string arguments from the resolved build task in
debugger_ui::session::running::RunningState::resolve_scenario after
template substitution, before spawning the build command. This is the
correct place to do this as:
1.It's the first point in the pipeline where the empty strings exist as
concrete values rather than unsubstituted template variables.
2. It acts as a general safety net for any future locator that produces
a shell-command build step with placeholder args.
3. Other languages (Go, Node, Python) use build: None and pass
structured JSON directly to their DAP adapters, so they never hit this
code path.


## Testing

Performed visual and self testing by replicating the issue. 

## 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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed unexpected argument '' upon trying to debug while cargo is
indexing

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
```

## Parents

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

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