# debugger: Allow users to shutdown debug sessions while they're booting \(\#34362\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8f6b9f0d65a8fec611a54ed053936cdb035c8082

Requested commit: 8f6b9f0d65a8fec611a54ed053936cdb035c8082

Commit: 8f6b9f0d65a8fec611a54ed053936cdb035c8082

Tree: 41fe41ce70f443b7ce851df8b8a99c7a7aabe951

Author: Anthony Eid

Committer: GitHub

## Message

```
debugger: Allow users to shutdown debug sessions while they're booting (#34362)

This solves problems where users couldn't shut down sessions while
locators or build tasks are running.

I renamed `debugger::Session::Mode` enum to `SessionState` to be more
clear when it's referenced in other crates. I also embedded the boot
task that is created in `SessionState::Building` variant. This allows
sessions to shut down all created threads in their boot process in a
clean and idiomatic way.

Finally, I added a method on terminal that allows killing the active
task.

Release Notes:

- Debugger: Allow shutting down debug sessions while they're booting up
```

## Parents

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

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