workerd
workerd copied to clipboard
🐛 BUG: ‘Step over’ on `await` clause in debugger completely resumes execution
Which Cloudflare product(s) does this pertain to?
Wrangler core
What version(s) of the tool(s) are you using?
3.15.0 [Wrangler]
What version of Node are you using?
20.8.1
What operating system are you using?
Linux (Ubuntu 20.04)
Describe the Bug
Write the following worker:
export default {
fetch: async () => {
await new Promise((resolve) => {
setTimeout(resolve, 5_000);
});
return new Response("OK");
},
};
Attach a debugger in local mode and set a breakpoint on the await line. Once it breaks, click ‘step over’ on your debugger. I would expect the program to move to the return line, but instead the debugger just completely resumes execution, returning the response to my client. This makes it hard to step through code because I have to add a breakpoint after every await.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response