Edge Computing with Cloudflare Workers
Better debugging for Cloudflare Workers, now with breakpoints

Better debugging for Cloudflare Workers, now with breakpoints

11/28/2023 · Adam Murray, Brendan Coll

What this post added

This post introduces and details the implementation of breakpoint debugging for Cloudflare Workers within the `workerd` runtime. It explains how the Chrome DevTools Protocol (CDP) is utilized, specifically the Debugger domain, and addresses the challenge of suspending execution in an event-driven, single-threaded environment by introducing a dedicated I/O thread for handling CDP messages. It also covers the setup for local debugging using Wrangler with VSCode and WebStorm, and the importance of source maps for mapping generated JavaScript back to original source code.

Read the original post ↗