dotnet / dotnet/vscode-csharp

Add a way to filter/group threads in the debugger call stack view

Open
#5,174 1 comment 0 reactions 0 assignees View on GitHub
Debugger External-Issue OmniSharp
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
17h 56m
Merged PRs (30d)
21

Description

Debugging a process with a lot of idle, external only or otherwise not relevant threads can be really tedious. It would be nice if there was a launch config or workspace setting I could use to group, sort, or deemphasize certain threads.

Mock up:

```json
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"callStackGroups": {
"NoCallStack": {
"noVisibleCallStack": true,
},
"Tasks": {
"name": [
".NET Long Running Task",
".NET ThreadPool Worker"
]
},
"Not Important": {
"name": [
"DefaultAggregationPeriodCycle",
"CommandMessageProcessing",
"*Logger*",
],
"method": [
"Start*Command"
],
"file": [
"**/StartEditorServicesCommand.cs"
]
}
}
}
```

I imagine these groups appearing under all of the unmatched thread similar to `[More]`, `Static members` and `Non-Public` members in the variables view:

![image](https://user-images.githubusercontent.com/24977523/163847310-ca32b98f-714e-4d36-8d6b-dea7e1124791.png)

Unsure if the VSCode extension API allows for something like that though. If not, then flatten the above json to remove group names and use it to sort them to the bottom and de-emphasize.

## Environment data
`dotnet --info` output:

```raw
.NET SDK (reflecting any global.json):
Version: 7.0.100-preview.2.22153.17
Commit: 9c52c56c13

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.100-preview.2.22153.17\

Host (useful for support):
Version: 7.0.0-preview.2.22152.2
Commit: e24f66dff0

.NET SDKs installed:
6.0.201 [C:\Program Files\dotnet\sdk]
6.0.202 [C:\Program Files\dotnet\sdk]
7.0.100-preview.2.22153.17 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.0-preview.2.22153.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.0-preview.2.22152.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.24 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.0-preview.2.22153.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
```

VS Code version:

```raw
1.66.2
dfd34e8260c270da74b5c2d86d61aee4b6d56977
x64
```

C# Extension version:

```raw
ms-dotnettools.csharp@1.24.4
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.