You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, you're ready to start building, running, and testing the repository.
28
+
Once you have these installed, you can navigate to the cloned vscode-csharp repository to proceed with building, running, and testing the repository.
42
29
43
30
### Building, Running, and Testing the Repository
44
31
@@ -50,21 +37,25 @@ Follow these steps to build, run, and test the repository:
50
37
2. Run `npm i -g gulp` - This command installs Gulp globally.
51
38
3. Run `gulp installDependencies` - This command downloads the various dependencies as specified by the version in the [package.json](package.json) file.
52
39
4. Run `code .` - This command opens the project in Visual Studio Code.
53
-
5. Run `npm run watch` (Optional) - This command watches for code changes.
54
40
55
41
#### Running
56
42
57
43
After completing the build steps:
58
44
59
-
1. Press <kbd>Ctrl+Shift+D</kbd> to open the Run view in VS Code and ensure `Launch Extension` is selected.
60
-
2. Start debugging by pressing <kbd>F5</kbd>.
45
+
1. Run `npm run watch` (Optional) - This command watches for code changes.
46
+
2. Press <kbd>Ctrl+Shift+D</kbd> to open the Run view in VS Code and ensure `Launch Extension` is selected.
47
+
3. Start debugging by pressing <kbd>F5</kbd>.
61
48
62
49
#### Testing
63
50
64
51
To run tests:
65
52
66
53
1. Execute `npm run test` or press <kbd>F5</kbd> in VS Code with the "Launch Tests" debug configuration selected.
67
-
2. For integration tests, select `Razor Integration Tests` and press <kbd>F5</kbd> to start debugging.
54
+
2. For integration tests, select either of the two 'current file' integration tests (one for roslyn and one for razor), from the drop-down and press <kbd>F5</kbd> to start debugging:
55
+
- For Roslyn Server: `Launch Current File slnWithCsproj Integration Tests`
56
+
- For Razor Server: `Launch Current File BasicRazorApp2_1 Integration Tests`
57
+
58
+
These will allow you to actually debug the test, but the 'Razor integration tests' configuration does not.
68
59
69
60
### Setting Up Local Language Servers
70
61
@@ -130,12 +121,14 @@ Before running the language servers, ensure you have followed the steps in the [
130
121
131
122
After completing the configuration, follow these steps:
132
123
133
-
1. Ensure the language server is fully built in Debug mode.
134
-
2. Open the `.sln` solution file for the language server in a Visual Studio instance. Keep this instance open for use in a later step.
135
-
3. Press `Ctrl+Shift+P` and select `Reload Window`. This ensures the changes from the configuration step are applied.
136
-
4. After reloading, a window will pop up prompting you to select or open a Visual Studio instance. Click `Cancel` at this stage. This is because we want to debug the child VS Code instance that will open after the next step, not the current instance.
137
-
5. Press `Ctrl+Shift+D` and then `F5` to launch the extension. The window from step 4 will appear again, prompting you to select or open a Visual Studio instance. Now, select the instance you opened in step 2.
138
-
6. The language server will now trigger a breakpoint on `Debugger.Launch()` when it starts.
124
+
1. Press `Ctrl+Shift+D` and then `F5` to launch the extension. This will open a new VS Code instance.
125
+
2. In the new VS Code instance, open the project or solution you want to debug.
126
+
3. Set the workspace settings to have the debug or the path to the server.
127
+
4. Ensure the language server is fully built in Debug mode.
128
+
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.
129
+
6. Back on VS Code, press `Ctrl+Shift+P` and select `Reload Window`. This ensures the changes from the configuration step are applied.
130
+
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.
131
+
8. The language server will now trigger a breakpoint on `Debugger.Launch()` when it starts.
0 commit comments