Skip to content

Unify logging commands under csharp.collectLogs#9032

Merged
JoeRobich merged 3 commits into
mainfrom
dev/jorobich/unify-logging-commands
Mar 2, 2026
Merged

Unify logging commands under csharp.collectLogs#9032
JoeRobich merged 3 commits into
mainfrom
dev/jorobich/unify-logging-commands

Conversation

@JoeRobich
Copy link
Copy Markdown
Member

@JoeRobich JoeRobich commented Feb 26, 2026

image

Combines the 3 logging commands into a single command which always captures the current log files. The user will be prompted to choose additional log sources like: Record Activity, Performance Trace, Memory Dump, and GC Dump. When dumps are combined with recording activity or a trace then they are taken before and after the recording.

@JoeRobich JoeRobich requested a review from a team as a code owner February 26, 2026 07:57
@JoeRobich JoeRobich requested a review from dibarbet February 26, 2026 17:46
Comment thread package.json
"command": "csharp.collectLogs",
"title": "%command.csharp.collectLogs%",
"category": "CSharp",
"enablement": "isWorkspaceTrusted && (dotnet.server.activationContext == 'Roslyn' || dotnet.server.activationContext == 'RoslynDevKit')"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the C#DK provides dump collection with their logging, we can disable this command when running with C#DK.

Suggested change
"enablement": "isWorkspaceTrusted && (dotnet.server.activationContext == 'Roslyn' || dotnet.server.activationContext == 'RoslynDevKit')"
"enablement": "isWorkspaceTrusted && dotnet.server.activationContext == 'Roslyn'"

}

if (gcDump) {
progress.report({
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A decent amount of mostly duplicative for these various collect options - could consider unifying into a a helper

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The progress reporting and tool acquisition is going away in a follow up.

Comment thread src/lsptoolshost/logging/profiling.ts
Comment thread src/lsptoolshost/logging/collectLogs.ts Outdated
@JoeRobich JoeRobich merged commit 43c84e3 into main Mar 2, 2026
33 checks passed
@JoeRobich JoeRobich deleted the dev/jorobich/unify-logging-commands branch March 2, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants