# Move \`debug_elements\` to \`AsyncAppContext\` · gitcafe/zed

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

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

Visibility: public

Requested revision: 794446bf8bd43afee0a2fb9269910c9d0c36b5ab

Requested commit: 794446bf8bd43afee0a2fb9269910c9d0c36b5ab

Commit: 794446bf8bd43afee0a2fb9269910c9d0c36b5ab

Tree: 7e56541b2878c0179bf8dc8e644346b8fc5fb613

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Move `debug_elements` to `AsyncAppContext`

Previously, `debug_elements` was available on `WindowContext`. If that
method was called while having a borrow out to a view, it would panic because
the view would already have been borrowed.

By moving it to an `AsyncAppContext` we ensure the method can't be called while
a view is being used.

```

## Parents

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

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