chichi
chichi

Reputation: 3292

Flutter: how to force Android debugger to just print Flutter code?

enter image description here

I get this logs and hard to check print() on console. How can I minimize these logs popping up every second?

Upvotes: 1

Views: 423

Answers (1)

Ziyad Mansy
Ziyad Mansy

Reputation: 437

One solution is by filtering the logs according to your print statements, all you have to do is to add a unique keyword of your own in the print statement followed by the flutter code to print as follow:

print('DebugPrintStatement: $FLUTTER_CODE_TO_PRINT');

then by pressing Ctrl + F in the debug console and enter your unique keyword (ex: DebugPrintStatement)

and just make sure that you look at the logs from debug console tab not Logcat tab!

Upvotes: 2

Related Questions