Closed
Description
Creating a DWDS-specific issue from flutter/devtools#3222
- Currently,
dart:developer
uses theconsole.log
web API fordeveloper.log
: https://github.com/dart-lang/sdk/blob/7933cd741d01239367c58f9a384a2bad4a086c4f/sdk/lib/_internal/js_dev_runtime/patch/developer_patch.dart#L70 - By default, Chrome truncates any
console.log
messages over a certain character limit (you can view the untruncated message by clicking the expand arrow in Chrome DevTools - However, when DWDS reads from the
console.log
stream, it is getting only the truncated messages: - This means that when DWDS forwards those messages to debugging clients (e.g. Flutter DevTools) those clients only have access to the truncated message
Some options:
-
Is there some way to get the non-truncated
console.log
messages from Chrome's log stream? -
If not, we can use
emitDebugEvent
indevleoper_patch
to send messages to DWDS instead of console.logging them (this is what dart-lang/sdk@c83eeac did forpostEvent
). This is the proposal here: Flutter Web truncates logs written with dart:developer flutter/devtools#3222 (comment)