Skip to content

Commit 26d9328

Browse files
committed
Reorder sections to improve flow
1 parent 40488fc commit 26d9328

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
- [Setting Up Local Language Servers](#setting-up-local-language-servers)
77
- [Roslyn](#roslyn)
88
- [Razor](#razor)
9+
- [Debugging Local Language Servers](#debugging-local-language-servers)
910
- [Configuring Local Language Servers](#configuring-local-language-servers)
1011
- [Finding the `settings.json` file for your workspace](#finding-the-settingsjson-file-for-your-workspace)
1112
- [Configuring Roslyn Language Server](#configuring-roslyn-language-server)
1213
- [Configuring Razor Language Server](#configuring-razor-language-server)
13-
- [Debugging Local Language Servers](#debugging-local-language-servers)
1414
- [Creating VSIX Packages for the Extension](#creating-vsix-packages-for-the-extension)
1515
- [Updating the `Roslyn` Language Server Version](#updating-the-roslyn-language-server-version)
1616

@@ -76,6 +76,23 @@ The server DLL is typically at `$roslynRepoRoot/artifacts/bin/Microsoft.CodeAnal
7676

7777
The server DLL is typically at `$razorRepoRoot/artifacts/bin/rzls/Debug/net8.0`.
7878

79+
### Debugging Local Language Servers
80+
81+
Before running the language servers, familiarize yourself with the steps in the [Configuring Local Language Servers](#configuring-local-language-servers) section to configure either the Roslyn or Razor language servers for debugging .
82+
83+
**Note**: You would only need to configure this for the workspace you wish to debug, NOT for the repo root of vscode-csharp repo.
84+
85+
Follow these steps to enable debugging:
86+
87+
1. Press `Ctrl+Shift+D` and then `F5` to launch the extension. This will open a new VS Code instance for `vscode-csharp` repo.
88+
2. In the new VS Code instance, open the project or solution you want to debug.
89+
3. Follow instructions in [Configuring Local Language Servers](#configuring-local-language-servers) to find and configure the workspace settings for the language server you want to debug.
90+
4. Ensure the language server is fully built in Debug mode.
91+
5. Meanwhile in a Visual Studio instance open the `.sln` solution file for the language server you want to debug. Keep this instance open for use in a later step.
92+
6. Back on VS Code, press `Ctrl+Shift+P` and select `Reload Window`. This ensures the changes made in step 3 are applied.
93+
7. After reloading, a window will pop up prompting you to select or open a Visual Studio instance. Now, select the instance you opened in step 5.
94+
8. The language server will now trigger a breakpoint on `Debugger.Launch()` when it starts.
95+
7996
### Configuring Local Language Servers
8097

8198
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.
@@ -123,21 +140,6 @@ Or, in VSCode settings (`Ctrl+,`):
123140
3. Enable `razor.languageServer.debug`.
124141
4. Set `razor.server.trace` to `Debug`. This gives you more detailed log messages in the output window.
125142

126-
### Debugging Local Language Servers
127-
128-
Before running the language servers, ensure you have followed the steps in the [Configuring Local Language Servers](#configuring-local-language-servers) section to configure either the Roslyn or Razor language servers for debugging.
129-
130-
After completing the configuration, follow these steps:
131-
132-
1. Press `Ctrl+Shift+D` and then `F5` to launch the extension. This will open a new VS Code instance for `vscode-csharp` repo.
133-
2. In the new VS Code instance, open the project or solution you want to debug.
134-
3. Follow instructions in [Finding the `settings.json` file for your workspace](#finding-the-settingsjson-file-for-your-workspace) to find and set the workspace settings for the language server you want to debug.
135-
4. Ensure the language server is fully built in Debug mode.
136-
5. Meanwhile in a Visual Studio instance open the `.sln` solution file for the language server you want to debug. Keep this instance open for use in a later step.
137-
6. Back on VS Code, press `Ctrl+Shift+P` and select `Reload Window`. This ensures the changes made in step 3 are applied.
138-
7. After reloading, a window will pop up prompting you to select or open a Visual Studio instance. Now, select the instance you opened in step 5.
139-
8. The language server will now trigger a breakpoint on `Debugger.Launch()` when it starts.
140-
141143
## Creating VSIX Packages for the Extension
142144

143145
To package this extension, we need to create VSIX Packages. The VSIX packages can be created using the gulp command `gulp vsix:release:package`. This will create all the platform specific VSIXs that you can then install manually in VSCode.

0 commit comments

Comments
 (0)