floggy icon indicating copy to clipboard operation
floggy copied to clipboard

[Bug] PrettyDeveloperPrinter not working

Open Chaitanyabsprip opened this issue 2 years ago • 5 comments

OS: MacOS BigSur 11.5.2 Flutter app running on Kitty Terminal Emulator testing on: iOS simulator iPhone 12 Pro Max

when I use PrettyDeveloperPrinter with iOS, nothing is being printed to console. I have come across something similar with PrettyPrinter with showColors: true. On iOS, the showColor option doesn't color the output, instead just prints the escape characters as is.

Chaitanyabsprip avatar Sep 04 '21 12:09 Chaitanyabsprip

@Chaitanyabsprip any update regarding this, I am facing the similar issue

strmchsr avatar Oct 05 '21 06:10 strmchsr

@Chaitanyabsprip any update regarding this, I am facing the similar issue

no updates, the package rarely gets any attention so I moved off of it.

Chaitanyabsprip avatar Oct 22 '21 19:10 Chaitanyabsprip

Hey @Chaitanyabsprip showColors is using ascii escape characters and pretty developer printer is using dart:developer, can you check if you get messages while logging with developer.log();

@strmchsr, What is you issue? Do you have code sample? Where are you running the app from?

lukaknezic avatar Oct 23 '21 15:10 lukaknezic

@lukaknezic Hey, I tried printing with the log function and nothing is printed to the terminal, not sure if stdout and the output on the terminal are the same. About the showColors in Pretty Printer, that works fine when working with android however it prints ascii literals when working with iOS emulator or device. Even with android devices/emulators, the output is capped at a certain amount of length which causes the output to continue being the color of the older incomplete log. probably cause the reset ascii couldn't be printed. You can throttle the output to allow for longer data dumps. I have opened another issue for the showColors not working for ios and I have mentioned the truncated output in another issue.

Chaitanyabsprip avatar Oct 24 '21 07:10 Chaitanyabsprip

@Chaitanyabsprip oh okay that is weird, so dart:developer is not working either? Will have to check why is that. In that case DefaultPrinter should work since DefaultPrinter is using just regular print to show logs.

About the cap on output, yeah that sounds like problem that ascii reset has not been printed. Once we cap the output the color issue should be fixed. Not sure how to handle ascii literals since if they are visible it means they are probably not supported, we will have to somehow check if they are supported, if not then we will ignore showColors bool.

lukaknezic avatar Oct 25 '21 12:10 lukaknezic