Kenneth Li
Kenneth Li

Reputation: 1732

Flutter disable system debug messages in Run Tab

I use:

print('Pls. show this line only');

to debug my flutter apps developed by Android Studio. However, the output in the [Run Tab] is usually something like:

Tens/Hundreds of system debug messages
I/flutter ( 9154): Pls. show this line only
Tens/Hundreds of system debug messages

OK, sometimes it takes me minutes to find my own debug message [Pls. show this line only].

My question is simple, how can we disable [Tens/Hundreds of system debug messages] in the Run Tab of Flutter Project in Android Studio?

Meanwhile, I am using:

print('***************************************************** Pls. show this line only');

as a work around.

Upvotes: 47

Views: 25609

Answers (8)

NOUN NGOEUN
NOUN NGOEUN

Reputation: 1

Debug(Alt+5) -> Layout Settings -> check variable and console see image below: enter image description here

Upvotes: 0

Gill Baits
Gill Baits

Reputation: 31

Alternative: Use Flutter Dev Tools

The Flutter Dev Tools show logs in a less verbose way:

Screenshot: Flutter Dev Tools

In Android Studio

Open the Flutter Dev Tools by clicking on the little Dart icon in the console of Android Studio.

Screenshot: Open Flutter Dev Tools and verbose logging

Upvotes: 3

Kaustuv Prajapati
Kaustuv Prajapati

Reputation: 406

Add

I/flutter

in filter of VsCode Debug Console Filter. enter image description here

Upvotes: 5

Shrinath Gupta
Shrinath Gupta

Reputation: 91

The android-studio 4.0 has a setting to make this messages go away. Go to File -> Settings -> Languages and Frameworks -> Flutter Uncheck the box stating Enable verbose logging

Settings View

Upvotes: 5

Ahmed Osama
Ahmed Osama

Reputation: 802

I Finally found a Workaround For VS code this is NOT permanent so you have to do it once per session but it helps a lot ...

there is a hidden feature in vs code for debug log filtering and all you need to do is to filter the log to have only the flutter related logs as follows :

1) focus on debug console (by clicking on it )

2) click ctrl + f (nothing will appear but you are now in filtering mode)

3) Type "I/Flutter"

4) hover on the word and click the icon next to it to make it stick .

Vscode debug console filtering for flutter

that's it !

Before :

enter image description here

After:

enter image description here

Upvotes: 24

Baker
Baker

Reputation: 27990

In Android Studio....

Before

enter image description here

Settings

File > Settings > Editor > General > Console

Look for section:

Fold console lines that contain

Click the + button on right hand side of scrollable list

Add your substring of what you'd like hidden from the Console output. enter image description here For example in Flutter, I'd remove D/ (i.e. letter D + forward slash) which are emulator debug messages.

After

enter image description here


Upvotes: 65

Gelderson Alves
Gelderson Alves

Reputation: 131

In Android Studio:

Upvotes: 13

Doc
Doc

Reputation: 11651

Select the option as shown in case IntelliJ IDEs or Android Studio

setting

Now you can filter as follows

filter

Upvotes: 8

Related Questions