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
{{ message }}
Repository navigation
Show full untruncated messages from dart:developer log() #2683
developer.log output is truncated so much that it's almost useless. IMO it would be better to just print entire thing - if I wanted to truncate, I could do it before calling the log method.
import'dart:developer';
voidmain(List<String> arguments) {
const text1 ="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
final text2 =Iterable.generate(100, (i) =>'Lorem ipsum dolor sit amet').join('\n');
log(text1);
log(text2);
}
Outputs:
[log] Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut e…
[log] Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
Lorem ipsum dolor si…
Exited
Activity
DanTup commentedon Jul 30, 2020
On the surface that seems like a reasonable change to me. There's a test here you might want to extend/copy with a longer message:
Dart-Code/src/test/dart_debug/debug/dart_cli.test.ts
Line 131 in b3b9555
Thanks!
[-]developer.log is truncated too much[/-][+]Show full untruncated messages from dart:developer log()[/+]szotp commentedon Jul 30, 2020
PR sent #2684