Skip to content

Commit 1644291

Browse files
authored
Merge pull request #7572 from dibarbet/issue_reporting
Add documentation on reporting issues
2 parents 15e7940 + c56cf2f commit 1644291

File tree

8 files changed

+60
-1
lines changed

8 files changed

+60
-1
lines changed

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
.vscode/**
1414
.vscode-test/**
1515
coverage/**
16+
docs/**
1617
out/**
1718
msbuild/**
1819
src/**

SUPPORT.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,69 @@
11
# Support
22

3-
## How to file issues and get help
3+
## How to get help
44

55
This project uses GitHub Issues to track bugs and feature requests. Please search the [existing issues](https://github.com/dotnet/vscode-csharp/issues) before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new Issue.
66

7+
This repository tracks issues related to the C# extension. Any issues related to the C# editing experience, Roslyn language server and other basic C# functionality should be filed here (regardless of if you're using C# Dev Kit or not).
8+
9+
For C# Dev Kit only features such as the Solution Explorer, Test Window, etc, please see https://github.com/microsoft/vscode-dotnettools/blob/main/SUPPORT.md
10+
711
For help and questions about using this project, please see the [README](https://github.com/dotnet/vscode-csharp/blob/main/README.md).
812

13+
### How to file an issue
14+
15+
We highly recommend using the C# extension's built-in command, `CSharp: Report an issue` (`csharp.reportIssue`) to create a pre-filled issue template. This will include helpful details such as local dotnet installations, installed extensions, and other information.
16+
![csharp.reportIssue command](./docs/report_issue.png)
17+
18+
#### Collecting general logs
19+
20+
The template has a section to include the `C#` output window logs. These logs are not automatically included as they may contain personal information (such as full file paths and project names), but they are key to resolving problems.
21+
22+
1. First, set `dotnet.server.trace` to `Trace` in VSCode settings
23+
![settings window showing trace option](./docs/trace_logs.png)
24+
2. Reload the window via the `Developer: Reload Window` (`workbench.action.reloadWindow`) command
25+
3. Reproduce the issue
26+
4. Open the output window via `View` -> `Output` and change to the `C#` output window.
27+
5. Select all (e.g. cntrl+a) and copy paste into the issue template under the 'C# Log' section. If you need to redact file paths and other information, please do so at this time.
28+
6. Once the logs are collected, reset `dotnet.server.trace` back to `Information`
29+
30+
Oftentimes the C# logs are enough, but sometimes when dealing with LSP server issues, the LSP trace logs are required. These can be found by following the same steps as above, but using the `C# LSP Trace Logs` output window instead.
31+
32+
#### Project loading problems
33+
34+
A common cause of missing language features is a failure to load the project(s) or solution. There can be a number of reasons why this happens, and some additional information is generally necessary to figure out what is going wrong.
35+
36+
First, providing the information from the issue template and the general logs (see above section) is almost always necessary. After that there are a couple things to check:
37+
38+
1. Is the file found in the correct project by the language server? This information is displayed in the bottom right corner of the VSCode window in the language status section. This item can be pinned using the pin icon so that it is always displayed.
39+
40+
![language status bar opened showing file active project context](./docs/language_status.png)
41+
2. If using C# Dev Kit, check that the Solution Explorer displays the project with the expected references. If not as expected, please also provide the contents of the `Projects` output window in the issue.
42+
43+
#### Colorization problems
44+
45+
For issues related to classification (colorizing the document), please provide the following
46+
1. Which theme is currently being used
47+
2. A screenshot of the `Developer: Inspect Editor Tokens and Scopes` (`editor.action.inspectTMScopes`) command output on the incorrect word
48+
![inspect tokens and scopes output](./docs/inspect_tokens.png)
49+
50+
#### Diagnostics problems
51+
52+
For issues with diagnostics, please provide values of the background analysis scope options, `dotnet.backgroundAnalysis.analyzerDiagnosticsScope` and `dotnet.backgroundAnalysis.compilerDiagnosticsScope`
53+
![background analysis settings](./docs/background_analysis.png)
54+
55+
#### Language server crashing
56+
57+
As before, the general log collection is usually useful. However we're not always able to diagnose just from the logs. In that case a crash dump is useful. This can be collected by setting the `dotnet.server.crashDumpPath` VSCode setting to a user-writeable folder.
58+
![vscode setting for crash dump path](./docs/crash_dump.png)
59+
60+
When the server crashes, this should create a crash dump for it.
61+
62+
> [!WARNING]
63+
> The dump can contain detailed information on the project - generally we will provide an email so that it can be shared privately
64+
65+
66+
967
## Microsoft Support Policy
1068

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

docs/background_analysis.png

48.1 KB
Loading

docs/crash_dump.png

34 KB
Loading

docs/inspect_tokens.png

67.3 KB
Loading

docs/language_status.png

13.5 KB
Loading

docs/report_issue.png

12.6 KB
Loading

docs/trace_logs.png

12.6 KB
Loading

0 commit comments

Comments
 (0)