You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should move the debugPrint() logic in rendering/debug.dart to the C++ side. It does seem to have solved the problem of data loss during high-volume logging.
(Having it on the C++ side, as native behaviour of Dart's print() built-in, would mean that all debug output would be throttled the same way, so people writing new frameworks would get this automatically, and people wouldn't have to import rendering.dart to get it even in regular Flutter apps.)
debugPrint and debugPrintThrottled (its default implementation) have moved from rendering to lib/src/foundation/print.dart and is still a Dart implementation that buffers lines in a list of strings, then schedules periodic flushes.
The intent here is to shift that logic from the framework to dart:ui in the engine so that people writing alternative frameworks could make use of it without having to pull in bits of the Flutter framework. In that sense, the issue is still valid, but given that a vast majority of our users are using Flutter with the framework (and not just dart:ui), this is likely to remain low on our priority list for the time being. Given that we've pulled it out of the render layer and into the foundation layer of the framework, it's probably even lower priority than it once was.
If someone in the community would like to implement this, I'll gladly review it though!
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
sethladd commentedon Sep 14, 2016
Do we still plan to do this?
Hixie commentedon Sep 14, 2016
Yes. Having debugPrint and print do different things leads to a confusing debug experience.
eseidelGoogle commentedon Jun 6, 2017
FYI @cbracken who's been in print stuff recently. (Not important, just thought you might like to see.)
7 remaining items
pedromassangocode commentedon Aug 26, 2020
Does this still a valid issue?
cbracken commentedon Aug 27, 2020
debugPrintanddebugPrintThrottled(its default implementation) have moved from rendering tolib/src/foundation/print.dartand is still a Dart implementation that buffers lines in a list of strings, then schedules periodic flushes.The intent here is to shift that logic from the framework to
dart:uiin the engine so that people writing alternative frameworks could make use of it without having to pull in bits of the Flutter framework. In that sense, the issue is still valid, but given that a vast majority of our users are using Flutter with the framework (and not justdart:ui), this is likely to remain low on our priority list for the time being. Given that we've pulled it out of the render layer and into the foundation layer of the framework, it's probably even lower priority than it once was.If someone in the community would like to implement this, I'll gladly review it though!
pedromassangocode commentedon Aug 28, 2020
I would like to take this. So what needs to be done is to move the
print.dartfile to thesky_engine/uidirectory?Hixie commentedon Feb 4, 2021
debugPrint has evolved into a more elaborate API than would make sense to squeeze into
print, so I think this is now WONTFIX.github-actions commentedon Aug 6, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.