Parcourir la source

Merge pull request #563 from smiclea/vscode-debug

Add ability to debug the project from VS Code
Sergiu Miclea il y a 5 ans
Parent
commit
117466ab39
2 fichiers modifiés avec 20 ajouts et 0 suppressions
  1. 15 0
      .vscode/launch.json
  2. 5 0
      README.md

+ 15 - 0
.vscode/launch.json

@@ -0,0 +1,15 @@
+{
+  // 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": "chrome",
+      "request": "launch",
+      "name": "Launch Chrome against localhost",
+      "url": "http://localhost:3001",
+      "webRoot": "${workspaceFolder}"
+    }
+  ]
+}

+ 5 - 0
README.md

@@ -29,6 +29,11 @@ Your server will be running at `http://localhost:3000/` (the port is configurabl
 - run `yarn ui-dev` to start local development server (starts on port 3001)
 - run `yarn server-dev` to start the express server in development mode
 
+To debug the client code using VS Code, simply run the project's launch configuration from the 'Run' menu (Ctrl+Shift+D).
+The last 2 `yarn ...` commands must be running in the background.
+
+To debug the Node server using VS Code, run `yarn server-debug` instead of `yarn server-dev`.
+
 You can view some of the UIs components in the [Storybook](https://github.com/storybooks/storybook) by running `yarn storybook`
 
 ## Modding