cloudflare / cloudflare/chanfana

Debugging doesn't work

Open
#117 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
766
Forks
70
Avg merge
25m
Merged PRs (30d)
4

Description

[Debug via breakpoints](https://developers.cloudflare.com/workers/observability/local-development-and-testing/#debug-via-breakpoints) doesn't seem to be working properly with async handle or execute.

```
async execute(request: Request) {
const response = await doSomething(request);
return response;
}
```

Setting a breakpoint at `const response = await doSomething(request);` will pause but the response is returned (using Postman) and I can't step over to the next line.

Seems like [this](https://github.com/cloudflare/itty-router-openapi/blob/e1272be6c2e0626ff1fc19e31fb2b822beda5f49/src/openapi.ts#L189) needs an async/await (maybe?)

Contributor guide

Open the contributing guide

Research direction

Start with the linked debugging documentation and the referenced src/openapi.ts line 189. Reproduce the breakpoint behavior using an async execute(request) handler and Postman, then trace how the handler's promise is processed. Done means stepping past the await reaches the next line normally while the response remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, typescript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.