cloudflare / cloudflare/workerd
devtools/vscode debugging still fails with Message is too large (>1MB)
- Dominant language
- C++
- Stars
- 8.7k
- Forks
- 739
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 174
Description
As mentioned in #1563, this still happens for large devtools messages that are passed between workerd instances.
Since these messages get read here:
https://github.com/cloudflare/workerd/blob/ce1f7c3e745ae3e17796ba853a911b301171e9da/src/workerd/api/web-socket.c%2B%2B#L913
They are also limited by the default 1M limit.
As an experiment (https://github.com/cloudflare/workerd/compare/main...erkkah:workerd:fix/hanging-debugsession) I increased the limit, which made the problem go away.
However, the limit should probable only be changed for the debugging case, and I don't know the code enough to suggest a solution.
In my setup, I hit this limit as soon as a breakpoint hits. I use 15 durable object namespaces. If I reduce the number of loaded namespaces, the problem goes away.
Contributor guide
Research direction
Start at src/workerd/api/web-socket.c++ around line 913, then read issue #1563 and compare the linked experiment that raises the message limit. Trace how debugging messages pass between workerd instances and identify how the limit can apply only to debugging. Done means VS Code debugging works with many durable object namespaces while the default limit remains for other messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100