Skip to content

Commit

Permalink
Add Different Launch Types to VSCode (#1430)
Browse files Browse the repository at this point in the history
# Description
This adds several different launch types to the VSCode. This allows you
to launch Client in Compatibility Mode for the Tools/Release versions as
well as launch the Server/Client at the same time in Tools/Release modes
and use the VSCode Terminal.

---

# TODO
- [x] Add different Build types in the tasks.json file.
- [x] Add different Launch types in the launch.json file.

---


![image](https://github.com/user-attachments/assets/c7ba1f8b-82e8-4f3c-9c19-cfc3d12cc978)
  • Loading branch information
CerberusWolfie committed Jan 5, 2025
1 parent 1c7db9c commit c033ff0
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 3 deletions.
84 changes: 82 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
// CLIENT CONFIGS
{
"name": "Client",
"type": "coreclr",
Expand All @@ -14,14 +15,56 @@
"stopAtEntry": false
},
{
"name": "Client (Compatibility renderer)",
"name": "Client (Tools)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build (Tools)",
"program": "${workspaceFolder}/bin/Content.Client/Content.Client.dll",
"args": [],
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Client (Release)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build (Release)",
"program": "${workspaceFolder}/bin/Content.Client/Content.Client.dll",
"args": [],
"console": "internalConsole",
"stopAtEntry": false
},
// COMPATABILITY RENDERERS
{
"name": "Client (Compatibility Renderer)",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/bin/Content.Client/Content.Client.dll",
"args": "--cvar display.compat=true",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Client (Tools) - (Compatability Renderer)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build (Tools)",
"program": "${workspaceFolder}/bin/Content.Client/Content.Client.dll",
"args": ["--cvar display.compat=true"],
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Client (Release) - (Compatability Renderer)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build (Release)",
"program": "${workspaceFolder}/bin/Debug/Content.Client/Content.Client.dll",
"args": ["--cvar display.compat=true"],
"console": "internalConsole",
"stopAtEntry": false
},
// SERVER CONFIGS
{
"name": "Server",
"type": "coreclr",
Expand All @@ -31,6 +74,27 @@
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "Server (Tools)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build (Tools)",
"program": "${workspaceFolder}/bin/Content.Server/Content.Server.dll",
"args": [],
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": "Server (Release)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build (Release)",
"program": "${workspaceFolder}/bin/Content.Server/Content.Server.dll",
"args": [],
"console": "internalConsole",
"stopAtEntry": false
},
// LINTER
{
"name": "YAML Linter",
"type": "coreclr",
Expand All @@ -50,6 +114,22 @@
"Client"
],
"preLaunchTask": "build"
},
{
"name": "Server/Client (Tools)",
"configurations": [
"Server (Tools)",
"Client (Tools)"
],
"preLaunchTask": "build (Tools)"
},
{
"name": "Server/Client (Release)",
"configurations": [
"Server (Release)",
"Client (Release)"
],
"preLaunchTask": "build (Release)"
}
]
}
}
42 changes: 41 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,46 @@
},
"problemMatcher": "$msCompile"
},
{
"label": "build (Tools)",
"command": "dotnet",
"type": "shell",
"args": [
"build",
"--configuration",
"Tools",
"/property:GenerateFullPaths=true", // Ask dotnet build to generate full paths for file names.
"/consoleloggerparameters:NoSummary" // Do not generate summary otherwise it leads to duplicate errors in Problems panel
],
"group": {
"kind": "build",
"isDefault": false
},
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
},
{
"label": "build (Release)",
"command": "dotnet",
"type": "shell",
"args": [
"build",
"--configuration",
"Release",
"/property:GenerateFullPaths=true", // Ask dotnet build to generate full paths for file names.
"/consoleloggerparameters:NoSummary" // Do not generate summary otherwise it leads to duplicate errors in Problems panel
],
"group": {
"kind": "build",
"isDefault": false
},
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
},
{
"label": "build-yaml-linter",
"command": "dotnet",
Expand All @@ -34,4 +74,4 @@
"problemMatcher": "$msCompile"
}
]
}
}

0 comments on commit c033ff0

Please sign in to comment.