-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rider - Better error handling and logging for failures running csharp…
…ier (#1032) * Working on rider issues #926 * Updating doc * formatting files * some cleanup * limit to compatible versions
- Loading branch information
Showing
21 changed files
with
17,231 additions
and
2,928 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: Troubleshooting | ||
hide_table_of_contents: true | ||
--- | ||
|
||
The editor extensions run CSharpier to facilitate format files. | ||
CSharpier is kept running to speed up formatting results. | ||
The extensions install CSharpier to a custom path to avoid commands like `dotnet tool update -g csharpier` failing because a CSharpier is running. | ||
|
||
When the extension is unable to format files, it is generally a problem with being unable to install or execute the extension. You can use the information from the logs it outputs to understand the failure and then attempt the troubleshooting steps below. | ||
|
||
## Enabling Debug Logs | ||
### VisualStudio | ||
- Navigate to `Tools - Options - CSharpier` | ||
- Change `Log Debug Messages` to `true` | ||
|
||
### VSCode | ||
- Navigate to `File - Preferences - Settings - Extensions - CSharpier` | ||
- Check `Enable debug logs` | ||
- Restart VSCode | ||
|
||
### Rider | ||
- Execute the action `Debug Log Settings` | ||
- Add an entry for `#com.intellij.csharpier.CSharpierLogger` | ||
- Restart Rider | ||
|
||
## Locating Logs | ||
### Visual Studio | ||
- Navigate to `View - Output` | ||
- Change the `Show output from:` dropdown to `CSharpier` | ||
|
||
### VSCode | ||
- Navigate to `View - Output` | ||
- Change the dropdown to `CSharpier` | ||
|
||
### Rider | ||
- Execute the action `Show Log in Explorer | ||
- Look for lines that contain `#c.i.c.CSharpierLogger` | ||
|
||
## Troubleshooting Steps | ||
The following can help track down issues with the extension being unable to install/run CSharpier | ||
|
||
1. Validate the following command can run in the directory of your project\ | ||
`dotnet csharpier --version` | ||
2. If the extension was able to install CSharpier it should exist at a path such as\ | ||
`C:\Users\[UserName]\AppData\Local\CSharpier\[CSharpierVersion]` or\ | ||
`$Home/.cache/csharpier/[CSharpierVersion]` | ||
3. Assuming the directory above exists, attempt to run the following in that directory\ | ||
`dotnet-csharpier --version` | ||
4. If the installation appears to be corrupt, delete the directory and install CSharpier there yourself\ | ||
`dotnet tool install csharpier --version [CSharpierVersion] --tool-path [PathFromStep2]` | ||
5. Repeat step 3 to validate the install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.