cloudflare / cloudflare/agents-starter

how can i debug server.ts in vscode

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
283
PR merge metrics
No merged PRs in 30d

Description

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

```json
{
"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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.