# debugger: Improve appearance of session list for JavaScript debugging \(\#34322\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a8cc92730363691c624f3a4671654c1e17f4f9ed

Requested commit: a8cc92730363691c624f3a4671654c1e17f4f9ed

Commit: a8cc92730363691c624f3a4671654c1e17f4f9ed

Tree: 0690c950a4b37062ad2c0275b872da8570713c5d

Author: Cole Miller

Committer: GitHub

## Message

```
debugger: Improve appearance of session list for JavaScript debugging (#34322)

This PR updates the debugger panel's session list to be more useful in
some cases that are commonly hit when using the JavaScript adapter. We
make two adjustments, which only apply to JavaScript sessions:

- For a child session that's the only child of a root session, we
collapse it with its parent. This imitates what VS Code does in the
"call stack" view for JavaScript sessions.
- When a session has exactly one thread, we label the session with that
thread's name, instead of the session label provided by the DAP. VS Code
also makes this adjustment, which surfaces more useful information when
working with browser sessions.

Closes #33072 

Release Notes:

- debugger: Improved the appearance of JavaScript sessions in the debug
panel's session list.

---------

Co-authored-by: Julia <julia@zed.dev>
Co-authored-by: Remco Smits <djsmits12@gmail.com>
```

## Parents

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

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