23

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

bluish
  • 26,356
  • 27
  • 122
  • 180
allprog
  • 16,540
  • 9
  • 56
  • 97
  • Eclipse allows you to set up different "perspectives" to group things as you want. I have separate perspectives configured for debugging, coding, ddms and layout designer. This allows me to switch to the configuration I prefer for that activity. – Moog Apr 19 '12 at 06:56
  • Yes, I use Eclipse quite hard core and perspectives are great. But the console comes back even if I close it, even if the "show when *" switches are turned off. This is what annoys me. – allprog Apr 20 '12 at 10:27
  • 1
    If you want to try something different, try IntelliJ Idea: http://www.jetbrains.com/idea/features/google_android.html I used to use Eclipse, but got sick of bugs/"features" like this. – theelfismike Apr 17 '12 at 02:20
  • I posted your solution as an answer, please accept it. In this way people will see immediately that the question is solved and doesn't need a solution anymore. ;) – bluish Nov 21 '12 at 12:51

5 Answers5

25

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>
flegare
  • 684
  • 7
  • 9
6

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.

allprog
  • 16,540
  • 9
  • 56
  • 97
  • @Pacerier The solution would be to implement that button's functionality (the DdmsPlugin.showConsoleView() method should take it into consideration instead of blindly popping the console.) So yes, there is no real solution at the moment. I started using Android Studio lately that seems to have less of these issues and it's being developed at a lightning fast pace. – allprog Nov 18 '14 at 16:31
  • 1
    Isn't Android Studio ["currently in beta. Some features are not yet implemented and you may encounter **bugs**"](https://developer.android.com/sdk/installing/studio.html)? – Pacerier Nov 19 '14 at 20:43
  • @Pacerier I didn't have to use it a lot, there may be issues that make it less suitable for production development. But Gradle is awesome and the Studio is even better. You can give it a try, if something breaks, then go back to Eclipse. The business code should not change at all, only the IDE project will be different. – allprog Nov 19 '14 at 21:33
  • Except messing around with IDE bugs would probably cost hundreds of man hours...... – Pacerier Nov 20 '14 at 07:45
  • The "currently in beta" message [doesn't seem to be there anymore](https://developer.android.com/sdk/index.html). Perhaps its stable now? – Pacerier Dec 19 '14 at 19:42
  • Well, it is called the official Android IDE now, so I guess it's a safe bet. – allprog Dec 20 '14 at 20:43
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.

Justin Buser
  • 2,813
  • 25
  • 32
-1

Open :

Window > Preferences > Run/Debug > Console

Disable these items :

  • Show when program writes to standard out

  • Show when program writes to standard error

Kermia
  • 4,171
  • 13
  • 64
  • 105
  • 6
    Doesn't answer his question, he want's to know about the DDMS console view, not the generic built in eclipse one. Why did you post this as an "Answer" when you didn't actually understand the question or test your response? – Justin Buser Apr 17 '12 at 02:18
  • 2
    Tried this and doesn't make any difference – Tim Kist Dec 16 '13 at 12:19
-1

@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...'

Colin Godsey
  • 1,293
  • 9
  • 14
  • Thank you. The Run/Debug > Console works for any other console but the ADB. I'll try to look into the source code to figure out where did they forget an if block... I'm not sure if this changed with the new release but in ADT R19 the logcat control is under Android > Logcat. – allprog Apr 20 '12 at 11:01