0

I created the basic Qwik starter app using npm create qwik@latest.

This create the following package.json scripts :

  "scripts": {
    "build": "qwik build",
    "build.client": "vite build",
    "build.preview": "vite build --ssr src/entry.preview.tsx",
    "build.static": "vite build --ssr src/entry.static.tsx",
    "build.types": "tsc --incremental --noEmit",
    "dev": "vite --mode ssr",
    "dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
    "fmt": "prettier --write .",
    "fmt.check": "prettier --check .",
    "lint": "eslint \"src/**/*.ts*\"",
    "preview": "qwik build preview && vite preview --open",
    "ssg": "node server/entry.static",
    "start": "vite --open --mode ssr",
    "qwik": "qwik"
  },

What would be the config to have in launch.json for VSCode to be able to debug (with breakpoints) the app (mainly the SSR part)

Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134

1 Answers1

0

I've just tried this and works perfect.

{
  // .vscode/launch.json
  "configurations": [
    {
      "name": "Qwik: debug server-side",
      "type": "node-terminal",
      "request": "launch",
      "command": "pnpm run dev"
    },
  ]
}
Daniel Heras
  • 33
  • 1
  • 5