Debugging Kitty Items using VSCode

Here’s the VSCode config for debugging the Kitty-Items project:

For the API: Start the API using the built-in debugger “Launch API”.
For the web project, first run: npm run start:dev and then run the debugger “Debug Web” to launch Chrome and attach.

{
  // 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": "node",
      "request": "launch",
      "name": "Launch API",
      "runtimeExecutable": "npm",
      "cwd": "${workspaceFolder}/api",
      "runtimeArgs": ["run", "start:dev"],
      "port": 9229
    },
    {
      "name": "Debug Web",
      "type": "chrome",
      "request": "launch",
      "webRoot": "${workspaceRoot}/web",
      "url": "http://localhost:3001",
      "userDataDir": "${workspaceRoot}/.vscode/chrome",
      "sourceMaps": true,
      "smartStep": true,
      "internalConsoleOptions": "openOnSessionStart",
      "skipFiles": ["node_modules/**"],
      "sourceMapPathOverrides": {
        "webpack:///*": "${webRoot}/*"
      }
    }
  ]
}
2 Likes