12

Everytime I tap the screen of my device, I see this message in the Flutter console

D/ViewRootImpl@38eee14[MainActivity]( 7994): ViewPostIme pointer 0

followed by

D/ViewRootImpl@38eee14[MainActivity]( 7994): ViewPostIme pointer 1

These messages crowd the console and get in the way of reading actual important logs, so is there a way to get rid of them?

Conner
  • 1,771
  • 11
  • 24
  • 1
    A better solution for this problem is addressed here: https://stackoverflow.com/questions/55437643/flutter-disable-system-debug-messages-in-run-tab – Renza Polza Feb 22 '22 at 16:29

4 Answers4

7

In VS Code, you can apply this search filter in the Debug Console:

!ViewPostIme

You can add more filters seperated by a comma:

!ViewPostIme,!ViewRootImpl

The '!' before a phrase excludes logs where the phrase occurs.

Example:

enter image description here

Sainath A
  • 610
  • 9
  • 10
5

I did it with

flutter run | grep -v "D/ViewRootImpl"
mancvso
  • 306
  • 4
  • 4
3

Late to the party, but for me the previous answers didn't work.

In Android Studio's Console, there is an option "Fold lines like this" to fold (hide) lines based on a pattern. Just right-click on any line in the Console...

enter image description here

That worked for me! That way I was also able to Debug my app from Android Studio by using Run 'main.dart' (I prefer that) instead of Command Line.

In your case, you could just add "D/" (or "D/ViewRootImpl") there. Also it is possible to use:

  • V/ (Verbose)
  • D/ (Debug)
  • I/ (Information)
  • W/ (Warning)
  • E/ (Error)
  • A/ (Assert)

Still to see only Flutter logs, also add "I/flutter" and "E/flutter" to the exceptions.

See the video here: https://www.youtube.com/watch?v=b2miXG6HRNY

Sisalik
  • 56
  • 5
1

You can always use:

flutter logs

instead.

Alternatively, if your using IntelliJ/ Android Studio, see: Flutter disable system debug messages in Run Tab

Yahya Uddin
  • 26,997
  • 35
  • 140
  • 231