Skip to content

Commit

Permalink
Add tasks for running a new vscode instance with a specific language …
Browse files Browse the repository at this point in the history
…server

Depends on dotnet/vscode-csharp#6316.
  • Loading branch information
333fred committed Sep 8, 2023
1 parent 20457a0 commit 4afada8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,30 @@
},
"problemMatcher": "$msCompile",
"group": "build"
},
{
"label": "build language server",
"command": "dotnet",
"type": "shell",
"args": [
"build",
"-c",
"Debug",
"src/Features/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Microsoft.CodeAnalysis.LanguageServer.csproj"
],
"problemMatcher": "$msCompile",
"group": "build"
},
{
"label": "launch vscode with language server",
"command": "${execPath}",
"type": "process",
"options": {
"env": {
"DOTNET_ROSLYN_LANGUAGE_SERVER": "${workspaceFolder}/artifacts/bin/Microsoft.CodeAnalysis.LanguageServer/net7.0/Microsoft.CodeAnalysis.LanguageServer.dll"
}
},
"dependsOn": [ "build language server" ]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Particularly for developers who aren't experienced with .NET Core development on
2. Install the latest [.NET 8.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0).
3. You can build from VS Code by running the *Run Build Task* command, then selecting an appropriate task such as *build* or *build current project* (the latter builds the containing project for the current file you're viewing in the editor).
4. You can run tests from VS Code by opening a test class in the editor, then using the *Run Tests in Context* and *Debug Tests in Context* editor commands. You may want to bind these commands to keyboard shortcuts that match their Visual Studio equivalents (**Ctrl+R, T** for *Run Tests in Context* and **Ctrl+R, Ctrl+T** for *Debug Tests in Context*).
5. You can launch a new VS Code instance with the language server from your current code by running the "launch vscode with language server" task.

## Running Tests
The unit tests can be executed by running `./build.sh --test`.
Expand Down

0 comments on commit 4afada8

Please sign in to comment.