From 7e244a422f843a12547edc93b3571a57c82fece6 Mon Sep 17 00:00:00 2001 From: Stephen Patane Date: Thu, 4 Apr 2024 12:58:08 +1100 Subject: [PATCH 1/2] Adding launch & tasks to properly debug client within vscode --- .vscode/launch.json | 38 ++++++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..91523dd --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,38 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "msedge", + "request": "launch", + "name": "Launch Client (Edge)", + "skipFiles": [ + "/**" + ], + "env": { + "VERSION": "Local build" + }, + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}", + "preLaunchTask": "start server", + "postDebugTask": "stop server" + }, + { + "type": "chrome", + "request": "launch", + "name": "Launch Client (Chrome)", + "skipFiles": [ + "/**" + ], + "env": { + "VERSION": "Local build" + }, + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}", + "preLaunchTask": "start server", + "postDebugTask": "stop server" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..e855276 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,39 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "start server", + "type": "npm", + "script": "start", + "isBackground": true, + "options": { + "env": { + "VERSION": "Local build" + } + }, + "problemMatcher": { + "pattern": { + "regexp": "ˆ$" + }, + "background": { + "activeOnStart": true, + "beginsPattern": "Compiling...", + "endsPattern": "Compiled .*" + } + } + }, + { + "label": "stop server", + "command": "echo ${input:terminate}", + "type": "shell" + } + ], + "inputs": [ + { + "id": "terminate", + "type": "command", + "command": "workbench.action.tasks.terminate", + "args": "terminateAll" + } + ] +} \ No newline at end of file From 90117fa3f8969bf101fcad31ca11a231b94832f6 Mon Sep 17 00:00:00 2001 From: Stephen Patane Date: Thu, 4 Apr 2024 13:16:46 +1100 Subject: [PATCH 2/2] Removing unnecessary environment variable --- .vscode/launch.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 91523dd..20734ed 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,9 +11,6 @@ "skipFiles": [ "/**" ], - "env": { - "VERSION": "Local build" - }, "url": "http://localhost:8080", "webRoot": "${workspaceFolder}", "preLaunchTask": "start server", @@ -26,9 +23,6 @@ "skipFiles": [ "/**" ], - "env": { - "VERSION": "Local build" - }, "url": "http://localhost:8080", "webRoot": "${workspaceFolder}", "preLaunchTask": "start server",