Skip to content

how can i debug server.ts in vscode #7

Description

@kunl

I've used tools like bun vite-node to configure launch.json, but nothing seems to work.

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Debug Server with Vite",
      "args": [
        "${workspaceFolder}/src/server.ts"
      ],
      "program": "${workspaceFolder}/node_modules/vite-node/dist/cli.cjs",
      "autoAttachChildProcesses": true,
      "sourceMaps": true,
      "smartStep": true,
      "env": {
        "VITE_DEBUG": "true",
        "OPENAI_API_KEY": "${env:OPENAI_API_KEY}"
      }
    },
    {
      "name": "Launch Chrome",
      "request": "launch",
      "type": "chrome",
      "url": "http://localhost:5173",
      "webRoot": "${workspaceFolder}"
    }
  ]
}
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions