# debugger: Fix rerun last debug scenario \(\#64856\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f8b0d52b3ef22604e4f01179f74c12d3cdd29b8a

Requested commit: f8b0d52b3ef22604e4f01179f74c12d3cdd29b8a

Commit: f8b0d52b3ef22604e4f01179f74c12d3cdd29b8a

Tree: 14681ed619ff04d48014c160848bc441f0d8bff3

Author: Meiram Shunshalin

Committer: GitHub

## Message

```
debugger: Fix rerun last debug scenario (#64856)

This change complements #38452 by adjusting `last_scheduled_scenario` to
account for reordered tasks in the inventory.

## Summary

Closes #58828
The "Rerun last debug scenario" action cycles through previous scenarios
instead of running the last one.

## Solution

Look for the last scenario from the front of the queue, as scenarios are
pushed to the front.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [ ] Tests cover the new or changed behavior.

Release Notes:

- debugger: Fixed "Rerun last debug scenario" not running the last
scheduled scenario.
```

## Parents

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

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