|
7 | 7 | - [Roslyn](#roslyn) |
8 | 8 | - [Razor](#razor) |
9 | 9 | - [Configuring Local Language Servers](#configuring-local-language-servers) |
10 | | - - [Roslyn](#roslyn-1) |
11 | | - - [Razor](#razor-1) |
| 10 | + - [Finding the `settings.json` file for your workspace](#finding-the-settingsjson-file-for-your-workspace) |
| 11 | + - [Configuring Roslyn Language Server](#configuring-roslyn-language-server) |
| 12 | + - [Configuring Razor Language Server](#configuring-razor-language-server) |
12 | 13 | - [Debugging Local Language Servers](#debugging-local-language-servers) |
13 | 14 | - [Creating VSIX Packages for the Extension](#creating-vsix-packages-for-the-extension) |
14 | 15 | - [Updating the `Roslyn` Language Server Version](#updating-the-roslyn-language-server-version) |
@@ -77,36 +78,43 @@ The server DLL is typically at `$razorRepoRoot/artifacts/bin/rzls/Debug/net8.0`. |
77 | 78 |
|
78 | 79 | ### Configuring Local Language Servers |
79 | 80 |
|
80 | | -This section provides instructions on how to debug locally built Roslyn and Razor language servers. You can do this by either directly editing the `settings.json` file or through the VSCode settings interface. |
| 81 | +This section provides instructions on how to debug locally built Roslyn and Razor language servers. You can do this by either directly editing the `settings.json` file of your workspace or through the VSCode settings interface. |
81 | 82 |
|
82 | | -#### Roslyn |
| 83 | +#### Finding the `settings.json` file for your workspace |
| 84 | +- Open the Command Palette with `Ctrl+Shift+P` |
| 85 | +- Type "Preferences: Open Workspace Settings" |
| 86 | +- Select the option that appears. |
| 87 | +- In the Workspace Settings tab, in the upper right corner, you'll see an icon that looks like a document with an arrow, which is the "Open Settings (JSON)" button. |
| 88 | +- Click on this button to open the `settings.json` file. |
| 89 | + |
| 90 | +#### Configuring Roslyn Language Server |
83 | 91 |
|
84 | | -1. Navigate to `C:\Users\YourUsername\AppData\Roaming\Code\User\settings.json` and add the following lines: |
| 92 | +In your workspace `settings.json` file, add the following lines: |
85 | 93 |
|
86 | 94 | ```json |
87 | 95 | "dotnet.server.waitForDebugger": true, |
88 | 96 | "dotnet.server.path": "$roslynRepoRoot\\artifacts\\bin\\Microsoft.CodeAnalysis.LanguageServer\\Debug\\net7.0\\Microsoft.CodeAnalysis.LanguageServer.dll" |
89 | 97 | ``` |
90 | 98 |
|
91 | | -Replace `$roslynRepoRoot` and `YourUsername` with your actual values. |
| 99 | +Replace `$roslynRepoRoot` with your actual values. |
92 | 100 |
|
93 | 101 | Or, in VSCode settings (`Ctrl+,`): |
94 | 102 |
|
95 | 103 | 1. Search for `dotnet server`. |
96 | 104 | 2. Set `dotnet.server.path` to the path of your Roslyn DLL. |
97 | 105 | 3. Enable `dotnet.server.waitForDebugger`. |
98 | 106 |
|
99 | | -#### Razor |
| 107 | +#### Configuring Razor Language Server |
100 | 108 |
|
101 | | -1. Navigate to `C:\Users\YourUsername\AppData\Roaming\Code\User\settings.json` and add the following lines: |
| 109 | +In your workspace settings.json file, add the following lines: |
102 | 110 |
|
103 | 111 | ```json |
104 | 112 | "razor.languageServer.debug": true, |
105 | 113 | "razor.languageServer.directory": "$razorRepoRoot\\artifacts\\bin\\rzls\\Debug\\net8.0", |
106 | 114 | "razor.server.trace": "Debug" |
107 | 115 | ``` |
108 | 116 |
|
109 | | -Replace `$razorRepoRoot` and `YourUsername` with your actual values. |
| 117 | +Replace `$razorRepoRoot` with your actual values. |
110 | 118 |
|
111 | 119 | Or, in VSCode settings (`Ctrl+,`): |
112 | 120 |
|
|
0 commit comments