cloudflare / cloudflare/agents-starter
how can i debug server.ts in vscode
- 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}"
}
]
}
```
Contributor guide
Assessment
This issue has not been assessed yet.