Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 754 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flutter disable system debug messages in Run Tab

#1
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.
Reply

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


[![setting][1]][1]


Now you can filter as follows

[![filter][2]][2]


[1]:

[2]:
Reply

#3
In Android Studio:

- select text you want to ignore in the console
- Right-click it
- Fold lines like this


[Android Studio Flutter Console folding][1]


[1]:
Reply

#4
In Android Studio....
===


Before
===
[![enter image description here][1]][1]


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][2]][2]
For example in Flutter, I'd remove `D/` (i.e. letter D + forward slash) which are emulator debug messages.

After
===
[![enter image description here][3]][3]


---



[1]:

[2]:

[3]:
Reply

#5
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][1]][1]

that's it !


**Before :**

[![enter image description here][2]][2]

**After:**

[![enter image description here][3]][3]


[1]:

[2]:

[3]:
Reply

#6
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][1]


[1]:
Reply

#7
Add

> I/flutter

in filter of VsCode Debug Console Filter.
[![enter image description here][1]][1]


[1]:
Reply

#8
Rather than filtering the logs, use the release version of the drivers :

> flutter run --release

This will avoid printing all the system logs like :

> V/MediaPlayerNative(22395): playback complete

And your debug prints will continue to display.
Drawback is you won't use anymore the hot reload. Reserved to investigate when the debug prints are flooded in system logs.

Of course applicable to VSCode.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through