dotnet / dotnet/vscode-csharp

Improve messaging when Razor server crashes: display how to set trace level

Open
#5,345 0 comments 0 reactions 0 assignees View on GitHub
OmniSharp
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

## Is your feature request related to a problem? Please describe.
When I get a razor error, the Output tab contains the following message:

> Razor's trace level is currently set to 'Off'
> - To change Razor's trace level set 'razor.trace' to 'Off', 'Messages' or 'Verbose' and then restart VSCode.
> - To report issues invoke the 'Report a Razor issue' command via the command palette.

When going to the Command Palette (CTRL + Shift + P) and typing "Report a Razor issue" I see the following message:
> ### Report a Razor issue
> Cannot start collecting Razor logs when razor.trace is set to Off. Please set razor.trace to Verbose and then reload your VSCode environment and re-run the report Razor issue command.

## Describe the solution you would like
At least one of these messages should contain instructions on how to find the elusive "razor.trace" setting.
Examples of more helpful messages:
> ### Report a Razor issue
> Cannot start collecting Razor logs when razor.trace is set to Off. Please set razor.trace to Verbose in file '/xxx/yyy/zz.abc' and then reload your VSCode environment and re-run the report Razor issue command.

> ### Report a Razor issue
> Cannot start collecting Razor logs when razor.trace is set to Off. Please set razor.trace to Verbose by going to the 'xxx' tab, selecting 'yyy' and searching for the 'zzz' option, and then reload your VSCode environment and re-run the report Razor issue command.

> Razor's trace level is currently set to 'Off'
> - To change Razor's trace level set 'razor.trace' to 'Off', 'Messages' or 'Verbose' in file '/xxx/yyy/zzz.abc' and then restart VSCode.
> - To report issues invoke the 'Report a Razor issue' command via the command palette. Razor's trace level must be set to 'Messages' or 'Verbose' for this command to work.

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.