Skip to content

Commit 40ced30

Browse files
[automated] Merge branch 'main' => 'prerelease' (#8958)
2 parents 30de58d + 355e943 commit 40ced30

38 files changed

+867
-50
lines changed

.github/copilot-instructions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,12 @@
3333

3434
## Project Conventions & Patterns
3535
- **TypeScript**: Follows strict linting (`.eslintrc.js`), including header/license blocks and camelCase filenames (except for interfaces and special files).
36+
- **Code Formatting**: After making code edits, always run `npx eslint <file-path> --fix` to auto-fix formatting issues (prettier) and lint errors. This ensures code passes CI checks.
3637
- **Component Downloads**: Language servers and debuggers are downloaded at runtime; see `package.json` for URLs and install logic.
3738
- **Copilot Providers**: Use `registerCopilotContextProviders` and `registerCopilotRelatedFilesProvider` to extend Copilot context for C#.
3839
- **Testing**: Prefer integration tests over unit tests for features. Structure follows:
3940
- `test/lsptoolshost/integrationTests/` for Roslyn/LSP features
40-
- `test/omnisharp/omnisharpIntegrationTests/` for OmniSharp features
41+
- `test/omnisharp/omnisharpIntegrationTests/` for OmniSharp features
4142
- `test/razor/razorIntegrationTests/` for Razor features
4243
- Use `test/*/integrationTests/integrationHelpers.ts` for test setup utilities
4344
- Tests use Jest with VS Code test environment and require workspace test assets
@@ -59,4 +60,4 @@
5960
- [src/lsptoolshost/copilot/](../src/lsptoolshost/copilot/): Copilot integration logic
6061

6162
---
62-
For any unclear or incomplete sections, please provide feedback to improve these instructions.
63+
For any unclear or incomplete sections, please provide feedback to improve these instructions.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
- Diagnostics related feature requests and improvements [#5951](https://github.com/dotnet/vscode-csharp/issues/5951)
44
- Debug from .csproj and .sln [#5876](https://github.com/dotnet/vscode-csharp/issues/5876)
55

6+
# 2.121.x
7+
* Use the package.json to gather all defined settings (PR: [#8954](https://github.com/dotnet/vscode-csharp/pull/8954))
8+
* Capture logs when recording a server trace (PR: [#8951](https://github.com/dotnet/vscode-csharp/pull/8951))
9+
* Log settings when capturing logs (PR: [#8948](https://github.com/dotnet/vscode-csharp/pull/8948))
10+
* Add captureLogs command which will record C# and C# LSP log activity (PR: [#8942](https://github.com/dotnet/vscode-csharp/pull/8942))
11+
* Bump Razor to 10.0.0-preview.26081.1 (PR: [#8940](https://github.com/dotnet/vscode-csharp/pull/8940))
12+
613
# 2.115.x
714
* Update Roslyn to 5.5.0-2.26080.10 (PR: [#8941](https://github.com/dotnet/vscode-csharp/pull/8941))
815
* LSP: Tolerate non-mutating requests where we are unable to determine the language (PR: [#81660](https://github.com/dotnet/roslyn/pull/81660))

SUPPORT.md

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,23 +117,61 @@ If the language server crashes, general logs are often helpful for diagnosing th
117117
> [!WARNING]
118118
> The dump will contain detailed information about the workspace. See [Sharing information privately](#sharing-information-privately)
119119
120+
### Capturing activity trace logging
121+
122+
When investigating issues that require detailed logging for a specific scenario, the C# extension provides a command to capture trace-level logs while you reproduce the issue. This is useful when the issue is difficult to reproduce or when you need to capture logs for a specific sequence of actions.
123+
124+
1. **Invoke the Capture Logs Command**:
125+
- Open the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on macOS).
126+
- Search for and select `CSharp: Capture Logs` (`csharp.captureLogs`).
127+
128+
2. **Reproduce the Issue**:
129+
- A notification will appear indicating that logs are being captured.
130+
- While the notification is visible, perform the actions that reproduce the issue.
131+
- The extension automatically sets the log level to `Trace` during capture to collect detailed information.
132+
133+
3. **Stop Capturing and Save**:
134+
- Click the `Cancel` button on the notification to stop capturing.
135+
- You will be prompted to save the log archive. Choose a location to save the `.zip` file.
136+
137+
4. **Share the Logs**:
138+
- The saved archive contains:
139+
- `csharp.log` - The existing C# log file
140+
- `csharp-lsp-trace.log` - The existing LSP trace log file
141+
- `csharp.activity.log` - Captured C# log activity during the recording session
142+
- `csharp-lsp-trace.activity.log` - Captured LSP trace activity during the recording session
143+
- `csharp-settings.json` - Current C# extension settings
144+
- Attach the archive to your GitHub issue or share it privately (see [Sharing information privately](#sharing-information-privately)).
145+
146+
> [!WARNING]
147+
> The logs may contain file paths, project names, and other workspace information. Review the contents before sharing publicly.
148+
120149
### Recording a language server trace
121150

122151
When investigating performance issues, we may request a performance trace of the language server to diagnose what is causing the problem. These are typically taken via [dotnet-trace](https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-trace) (a cross platform tool to collect performance traces of .NET processes)
123152

124-
The C# extension has a built in command, `csharp.recordLanguageServerTrace` to help with trace collection. This command will install `dotnet-trace` as a global tool and invoke it against the language server.
153+
The C# extension has a built in command, `csharp.recordLanguageServerTrace` to help with trace collection. This command will install `dotnet-trace` as a global tool, invoke it against the language server, and package the results along with logs into a `.zip` archive.
125154

126155
1. Invoke the record language server trace command
127156
![alt text](docs/images/recordTraceCommand.png)
128-
2. Select the folder to save the trace.
157+
2. Choose a location to save the trace archive (`.zip` file).
129158
3. Accept the default trace arguments, or change them if requested
130159
![alt text](docs/images/recordTraceArgs.png)
131-
4. A new terminal window will open to run the trace collection. While the trace is running, reproduce the peformance issue. When done, hit <Enter> or <Ctrl+C> in the trace window to stop the trace
160+
4. A new terminal window will open to run the trace collection. While the trace is running, reproduce the performance issue. When done, hit <Enter> or <Ctrl+C> in the trace window to stop the trace, or click `Cancel` on the progress notification.
132161
![alt text](docs/images/recordTraceTerminal.png)
133-
5. Share the trace.
162+
5. The extension will automatically package the trace and logs into an archive.
163+
6. Attach the archive to your GitHub issue or share it privately (see [Sharing information privately](#sharing-information-privately)).
164+
165+
The saved archive contains:
166+
- The `.nettrace` file from dotnet-trace
167+
- `csharp.log` - The existing C# log file
168+
- `csharp-lsp-trace.log` - The existing LSP trace log file
169+
- `csharp.activity.log` - Captured C# log activity during the trace session
170+
- `csharp-lsp-trace.activity.log` - Captured LSP trace activity during the trace session
171+
- `csharp-settings.json` - Current C# extension settings
134172

135173
> [!WARNING]
136-
> The trace will contain detailed information about the workspace. See [Sharing information privately](#sharing-information-privately)
174+
> The trace and logs will contain detailed information about the workspace. See [Sharing information privately](#sharing-information-privately)
137175
138176
### Sharing information privately
139177
Detailed logs, dumps, traces, and other information can sometimes contain private information that you do not wish to share publicly on GitHub (for example file paths and file contents). Instead, you can utilize the Developer Community page to share these privately to Microsoft.

l10n/bundle.l10n.cs.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"C# Workspace Status": "Stav pracovního prostoru C#",
1919
"C# configuration has changed. Would you like to relaunch the Language Server with your changes?": "Konfigurace jazyka C# se změnila. Chcete znovu spustit jazykový server se změnami?",
2020
"C# configuration has changed. Would you like to reload the window to apply your changes?": "Konfigurace jazyka C# se změnila. Chcete znovu načíst okno, aby se změny použily?",
21+
"C# logs saved successfully.": "C# logs saved successfully.",
2122
"Can not find an opened workspace folder. Please open a folder before starting to debug with a '{0}' configuration'.": "Nelze najít otevřenou složku pracovního prostoru. Než začnete ladit s konfigurací {0}, otevřete prosím složku.",
2223
"Can't parse envFile {0} because of {1}": "Nelze analyzovat envFile {0} z důvodu {1}",
2324
"Cancel": "Zrušit",
@@ -27,6 +28,7 @@
2728
"Cannot load Razor OmniSharp language server because the directory was not found: '{0}'": "Nepovedlo se načíst jazykový server Razor OmniSharp, protože se nenašel adresář: {0}",
2829
"Cannot resolve .NET debug configurations. The server is still initializing or has exited unexpectedly.": "Nelze přeložit konfigurace ladění .NET. Server se stále inicializuje nebo se neočekávaně ukončil.",
2930
"Cannot start collecting Razor logs when {0} is set to {1}. Please open the output window, choose the \"Razor Log\", and use the gear icon to ensure the log level is set to \"Debug\" or \"Trace\".": "Nelze spustit shromažďování protokolů Razor, když je {0} nastaveno na {1}. Otevřete prosím okno výstupu, zvolte Protokol Razor a pomocí ikony ozubeného kola ověřte, že úroveň protokolu je nastavená na Ladit nebo Trasovat.",
31+
"Capturing C# Logs": "Capturing C# Logs",
3032
"Choose": "Zvolit",
3133
"Choose and set default": "Zvolit a nastavit výchozí",
3234
"Click {0}. This will copy all relevant issue information.": "Klikněte na {0}. Zkopírují se tím všechny relevantní informace o problému.",
@@ -40,6 +42,7 @@
4042
"Could not locate .NET Core project in '{0}'. Assets were not generated.": "V umístění {0} se nepovedlo najít projekt .NET Core. Prostředky se nevygenerovaly.",
4143
"Couldn't create self-signed certificate. See output for more information.": "Certifikát podepsaný svým držitelem (self-signed certificate) se nepovedlo vytvořit. Další informace najdete ve výstupu.",
4244
"Couldn't create self-signed certificate. {0}\r\ncode: {1}\r\nstdout: {2}": "Certifikát podepsaný svým držitelem (self-signed certificate) se nepovedlo vytvořit. {0}\r\nkód: {1}\r\nstdout: {2}",
45+
"Creating log archive...": "Creating log archive...",
4346
"Description of the problem": "Popis problému",
4447
"Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Zjistila se změna v nastavení telemetrie. Tyto změny se projeví až po restartování jazykového serveru. Chcete ho restartovat?",
4548
"Disable message in settings": "Zakázat zprávu v nastavení",
@@ -62,6 +65,7 @@
6265
"Failed to install dotnet-trace, it may need to be manually installed. See C# output for details./dotnet-trace is a command name and should not be localized": "Nepovedlo se nainstalovat dotnet-trace, může být potřeba ho nainstalovat ručně. Podrobnosti najdete ve výstupu jazyka C#.",
6366
"Failed to parse tasks.json file: {0}": "Nepovedlo se parsovat soubor tasks.json: {0}",
6467
"Failed to run test: {0}": "Spuštění testu se nezdařilo: {0}",
68+
"Failed to save C# logs: {0}/{0} is the error message": "Failed to save C# logs: {0}",
6569
"Failed to set debugadpter directory": "Nepovedlo se nastavit adresář debugadpter.",
6670
"Failed to set extension directory": "Nepovedlo se nastavit adresář rozšíření.",
6771
"Failed to set install complete file path": "Nepovedlo se nastavit úplnou cestu k souboru instalace",
@@ -109,6 +113,7 @@
109113
"OmniSharp": "OmniSharp",
110114
"OmniSharp Log": "Protokol OmniSharp",
111115
"OmniSharp requires a complete install of Mono (including MSBuild) to provide language services when `omnisharp.useModernNet` is disabled in Settings. Please install the latest Mono and restart.": "OmniSharp vyžaduje kompletní instalaci modulu runtime Mono (včetně MSBuildu), aby mohl poskytovat jazykové služby, pokud je v nastavení vypnutý parametr omnisharp.useModernNet. Nainstalujte prosím nejnovější verzi modulu runtime Mono a proveďte restart.",
116+
"Open Folder": "Open Folder",
112117
"Open envFile": "Otevřít soubor envFile",
113118
"Open settings": "Otevřít nastavení",
114119
"Open solution": "Otevřít řešení",
@@ -129,6 +134,7 @@
129134
"Razor issue data collection started. Reproduce the issue then press \"Stop\"": "Spustilo se shromažďování dat o problému Razor. Reprodukujte problém a stiskněte Zastavit.",
130135
"Razor issue data collection stopped. Copying issue content...": "Shromažďování dat o problému s Razorem se zastavilo. Kopíruje se obsah problému…",
131136
"Razor.VSCode version": "Verze Razor.VSCode",
137+
"Recording logs... Click Cancel to stop and save.": "Recording logs... Click Cancel to stop and save.",
132138
"Recording trace...": "Zaznamenává se trasování...",
133139
"Reload C# Extension": "Znovu načíst rozšíření C#",
134140
"Reload Window": "Znovu načíst okno",
@@ -143,6 +149,8 @@
143149
"Restore {0}": "Obnovit {0}",
144150
"Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Spustit a ladit: Není nainstalovaný platný prohlížeč. Nainstalujte si prosím Edge nebo Chrome.",
145151
"Run and Debug: auto-detection found {0} for a launch browser": "Spustit a ladit: Automatická detekce našla {0} pro spouštěný prohlížeč.",
152+
"Save C# Logs": "Save C# Logs",
153+
"Save Logs": "Save Logs",
146154
"Security Warning": "Upozornění zabezpečení",
147155
"See {0} output": "Zobrazit výstup {0}",
148156
"Select Folder to Save Trace File": "Vybrat složku pro uložení trasovacího souboru",

l10n/bundle.l10n.de.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"C# Workspace Status": "C#-Arbeitsbereichsstatus",
1919
"C# configuration has changed. Would you like to relaunch the Language Server with your changes?": "Die C#-Konfiguration wurde geändert. Möchten Sie den Sprachserver mit Ihren Änderungen neu starten?",
2020
"C# configuration has changed. Would you like to reload the window to apply your changes?": "Die C#-Konfiguration wurde geändert. Möchten Sie das Fenster neu laden, um Ihre Änderungen anzuwenden?",
21+
"C# logs saved successfully.": "C# logs saved successfully.",
2122
"Can not find an opened workspace folder. Please open a folder before starting to debug with a '{0}' configuration'.": "Es wurde kein geöffneter Arbeitsbereichsordner gefunden. Öffnen Sie einen Ordner, bevor Sie mit dem Debuggen mit einer {0}-Konfiguration beginnen.",
2223
"Can't parse envFile {0} because of {1}": "envFile {0} kann aufgrund von {1} nicht analysiert werden.",
2324
"Cancel": "Abbrechen",
@@ -27,6 +28,7 @@
2728
"Cannot load Razor OmniSharp language server because the directory was not found: '{0}'": "Der Razor OmniSharp-Sprachserver kann nicht geladen werden, da das Verzeichnis nicht gefunden wurde: „{0}“",
2829
"Cannot resolve .NET debug configurations. The server is still initializing or has exited unexpectedly.": ".NET-Debugkonfigurationen können nicht aufgelöst werden. Der Server wird noch initialisiert oder wurde unerwartet beendet.",
2930
"Cannot start collecting Razor logs when {0} is set to {1}. Please open the output window, choose the \"Razor Log\", and use the gear icon to ensure the log level is set to \"Debug\" or \"Trace\".": "Die Erfassung von Razor-Protokollen kann nicht gestartet werden, wenn {0} auf {1} festgelegt ist. Öffnen Sie das Ausgabefenster, wählen Sie das „Razor-Protokoll“ aus und stellen Sie über das Zahnradsymbol sicher, dass die Protokollstufe auf „Debuggen“ oder „Nachverfolgung“ eingestellt ist.",
31+
"Capturing C# Logs": "Capturing C# Logs",
3032
"Choose": "Auswählen",
3133
"Choose and set default": "Standard auswählen und festlegen",
3234
"Click {0}. This will copy all relevant issue information.": "Klicken Sie auf {0}. Dadurch werden alle relevanten Probleminformationen kopiert.",
@@ -40,6 +42,7 @@
4042
"Could not locate .NET Core project in '{0}'. Assets were not generated.": "Das .NET Core-Projekt wurde in \"{0}\" nicht gefunden. Ressourcen wurden nicht generiert.",
4143
"Couldn't create self-signed certificate. See output for more information.": "Das selbstsignierte Zertifikat konnte nicht erstellt werden. Weitere Informationen finden Sie in der Ausgabe.",
4244
"Couldn't create self-signed certificate. {0}\r\ncode: {1}\r\nstdout: {2}": "Selbstsigniertes Zertifikat konnte nicht erstellt werden. {0}\r\nCode: {1}\r\nstdout: {2}",
45+
"Creating log archive...": "Creating log archive...",
4346
"Description of the problem": "Beschreibung des Problems",
4447
"Detected change in telemetry settings. These will not take effect until the language server is restarted, would you like to restart?": "Es wurde eine Änderung der Telemetrieeinstellungen erkannt. Diese werden erst wirksam, nachdem der Sprachserver neu gestartet wurde. Möchten Sie einen Neustart durchführen?",
4548
"Disable message in settings": "Nachricht in Einstellungen deaktivieren",
@@ -62,6 +65,7 @@
6265
"Failed to install dotnet-trace, it may need to be manually installed. See C# output for details./dotnet-trace is a command name and should not be localized": "dotnet-trace konnte nicht installiert werden, möglicherweise ist eine manuelle Installation erforderlich. Details finden Sie in der C#-Ausgabe.",
6366
"Failed to parse tasks.json file: {0}": "Fehler beim Analysieren der Datei \"tasks.json\": {0}",
6467
"Failed to run test: {0}": "Fehler beim Ausführen der Tests: {0}",
68+
"Failed to save C# logs: {0}/{0} is the error message": "Failed to save C# logs: {0}",
6569
"Failed to set debugadpter directory": "Fehler beim Festlegen des Debugadapterverzeichnisses",
6670
"Failed to set extension directory": "Fehler beim Festlegen des Erweiterungsverzeichnisses",
6771
"Failed to set install complete file path": "Fehler beim Festlegen des Vollständigen Installationsdateipfads.",
@@ -109,6 +113,7 @@
109113
"OmniSharp": "OmniSharp",
110114
"OmniSharp Log": "OmniSharp-Protokoll",
111115
"OmniSharp requires a complete install of Mono (including MSBuild) to provide language services when `omnisharp.useModernNet` is disabled in Settings. Please install the latest Mono and restart.": "OmniSharp erfordert eine vollständige Installation von Mono (einschließlich MSBuild), um Sprachdienste bereitzustellen, wenn „omnisharp.useModernNet“ in den Einstellungen deaktiviert ist. Installieren Sie die neueste Mono-Version, und führen Sie einen Neustart aus.",
116+
"Open Folder": "Open Folder",
112117
"Open envFile": "envFile öffnen",
113118
"Open settings": "Einstellungen öffnen",
114119
"Open solution": "Projektmappe öffnen",
@@ -129,6 +134,7 @@
129134
"Razor issue data collection started. Reproduce the issue then press \"Stop\"": "Die Sammlung von Razor-Problemdaten wurde gestartet. Reproduzieren Sie das Problem, und drücken Sie dann \"Beenden\".",
130135
"Razor issue data collection stopped. Copying issue content...": "Die Sammlung von Razor-Problemdaten wurde beendet. Probleminhalt wird kopiert...",
131136
"Razor.VSCode version": "Razor.VSCode-Version",
137+
"Recording logs... Click Cancel to stop and save.": "Recording logs... Click Cancel to stop and save.",
132138
"Recording trace...": "Ablaufverfolgung wird aufgezeichnet...",
133139
"Reload C# Extension": "C#-Erweiterung neu laden",
134140
"Reload Window": "Fenster neu laden",
@@ -143,6 +149,8 @@
143149
"Restore {0}": "\"{0}\" wiederherstellen",
144150
"Run and Debug: A valid browser is not installed. Please install Edge or Chrome.": "Ausführen und Debuggen: Es ist kein gültiger Browser installiert. Installieren Sie Edge oder Chrome.",
145151
"Run and Debug: auto-detection found {0} for a launch browser": "Ausführen und Debuggen: Die automatische Erkennung hat {0} für einen Startbrowser gefunden.",
152+
"Save C# Logs": "Save C# Logs",
153+
"Save Logs": "Save Logs",
146154
"Security Warning": "Sicherheitswarnung",
147155
"See {0} output": "{0}-Ausgabe anzeigen",
148156
"Select Folder to Save Trace File": "Ordner zum Speichern der Ablaufverfolgungsdatei auswählen",

0 commit comments

Comments
 (0)