Flutter disable system debug messages in Run Tab

后端 未结 5 1128
猫巷女王i
猫巷女王i 2020-12-31 22:10

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

相关标签:
5条回答
  • 2020-12-31 22:33

    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 .

    that's it !

    Before :

    After:

    0 讨论(0)
  • 2020-12-31 22:35

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

    Now you can filter as follows

    0 讨论(0)
  • 2020-12-31 22:49

    In Android Studio:

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

      Android Studio Flutter Console folding

    0 讨论(0)
  • 2020-12-31 22:54

    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

    0 讨论(0)
  • 2020-12-31 22:55

    In Android Studio....

    Before

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

    After


    0 讨论(0)
提交回复
热议问题