Skip to content

Commit 42262fe

Browse files
authored
Add instructions for collecting language server trace (#8405)
2 parents aa28c99 + 3923e45 commit 42262fe

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

SUPPORT.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ For issues with Razor, the Razor Log output window can contain useful informatio
6868
4. **Reset the Log Level**:
6969
- Once the logs are collected, reset the log level to `Info`.
7070

71-
#### Project Loading Problems
71+
### Project Loading Problems
7272

7373
Missing language features are often caused by a failure to load the project(s) or solution. To diagnose and resolve these issues, follow these steps:
7474

@@ -86,7 +86,7 @@ Missing language features are often caused by a failure to load the project(s) o
8686
- If you are using C# Dev Kit, check the Solution Explorer to ensure the project is displayed with the expected references.
8787
- If the references or structure are not as expected, include the contents of the `Projects` output window in your issue report.
8888

89-
#### Colorization problems
89+
### Colorization problems
9090
If you encounter issues with document classification (e.g., incorrect syntax highlighting or colorization), please provide the following information to help us diagnose the problem:
9191

9292
1. **Theme in Use**:
@@ -101,7 +101,7 @@ If you encounter issues with document classification (e.g., incorrect syntax hig
101101

102102
![Inspect Tokens and Scopes Output](./docs/inspect_tokens.png)
103103

104-
#### Diagnostics problems
104+
### Diagnostics problems
105105

106106
For issues with diagnostics, please provide values of the background analysis scope options, `dotnet.backgroundAnalysis.analyzerDiagnosticsScope` and `dotnet.backgroundAnalysis.compilerDiagnosticsScope`
107107
![background analysis settings](./docs/background_analysis.png)
@@ -116,6 +116,21 @@ If the language server crashes, general logs are often helpful for diagnosing th
116116
> [!WARNING]
117117
> The dump can contain detailed information on the project - generally we will provide an email so that it can be shared privately
118118
119+
#### Recording a language server trace
120+
121+
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)
122+
123+
The C# extension has a built in command, `csharp.recordTrace` to help with trace collection. This command will install `dotnet-trace` as a global tool and invoke it against the language server.
124+
125+
1. Invoke the `csharp.recordTrace` command
126+
![alt text](docs/recordTraceCommand.png)
127+
2. Select the folder to save the trace.
128+
3. Accept the default trace arguments, or change them if requested
129+
![alt text](docs/recordTraceArgs.png)
130+
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
131+
![alt text](docs/recordTraceTerminal.png)
132+
5. Share the trace. Note that the trace may contain PII, so generally we will provide an email or other confidential way to share the trace with us.
133+
119134
## Microsoft Support Policy
120135

121136
Support for this project is limited to the resources listed above.

docs/recordTraceArgs.png

9.45 KB
Loading

docs/recordTraceCommand.png

8.01 KB
Loading

docs/recordTraceTerminal.png

37.4 KB
Loading

0 commit comments

Comments
 (0)