# debugger: Make sure debuggees are killed when quitting Zed \(\#32186\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6c0ea88f5b4034b75466776ac65e13d72d5b1183

Requested commit: 6c0ea88f5b4034b75466776ac65e13d72d5b1183

Commit: 6c0ea88f5b4034b75466776ac65e13d72d5b1183

Tree: 85f3c4ce77c7b8cd8f3cddf8acfaf673a3f53ee4

Author: Cole Miller

Committer: GitHub

## Message

```
debugger: Make sure debuggees are killed when quitting Zed (#32186)

Closes #31373 

We kill the DAP process in our `on_app_quit` handler, but the debuggee
might not be killed. Try to make this more reliable by making the DAP
process its own process group leader, and killing that entire process
group when quitting Zed.

I also considered going through the normal DAP shutdown sequence here,
but that seems dicey in a quit handler. There's also the DAP
`ProcessEvent` but it seems we can't rely on that as e.g. the JS DAP
doesn't send it.

Release Notes:

- Debugger Beta: Fixed debuggee processes not getting cleaned up when
quitting Zed.
```

## Parents

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

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