How can I turn off the auto show of ADB consoles i

2019-02-02 23:04发布

问题:

This is quite annoying actually. Whenever there is an error, the ADB console windows keep popping into my face in Eclipse. The Hierarchy viewer, the DDMS and the Android console "fight" for being shown even if I close the views.

I tried to find switches in the preferences but in vain. Also, these windows don't have the usual "Show when..." buttons.

Is there any way to turn these off? Thanks in advance.

Android issue tracker link with patch: Android Issue 40123: SDK Eclipse DDMS console is stealing the focus when there is an error

回答1:

I simply put the console under the package hierachy in eclipse, it doesnt take too much space there since i put ratio ~15%.

With this setup I can see if there is red stuff going in the console + fully see my logcat which take the rest of the bottom part of eclipse.

Here some ASCII hot skill to express my setup.

<pre>
##################################################
#       #                                #       #
#Package#                                #       #
# stuff #  Code stuff                    # out   #
#       #                                # line  #
#       #                                # stuff #
#       #                                #       #
#       #                                #       #
#       #                                #       #
#       #                                #       #
#       #                                #       #
#       ##########################################
#       #     |                                  #
#       #     |                                  #
#########     |    logcat stuff                  #
#console#     |                                  #
# stuff #     |                                  #
##################################################
</pre>


回答2:

I found it in the DDMS plugin source. Basically, if there is an error message, then the console is automatically popped up. The switch button to prevent this is not implemented at all. I have a library project that does not produce an apk file (since it doesn't have to) at the end of the build process and adt cries about this.



回答3:

What I did to prevent this annoying behavior while using the Dalvik Debug Monitor stand alone version instead of logcat was the following:

In the console window click on the drop down furthest to the right (next to minimize) and choose "New Console View". Set the new console to DDMS, then pin it(important) and set it to be a Fast View (right click on the tab itself). Finally, in the original console view select Android and pin this one as well. DDMS should stay hidden now, assuming you don't close the console you pinned it in.



回答4:

Open :

Window > Preferences > Run/Debug > Console

Disable these items :

  • Show when program writes to standard out

  • Show when program writes to standard error



回答5:

@Kermia - that is correct for disabling the console. Unfortunately, Android development leaves us with Console popping up at one point, and ADB at others =\ So similarly, you can disable the ADB auto-popup here: Window > Preferences > Run/Debug > Console, 'Display logcat view when...'