132

Is it possible to detach the console/log window in Xcode 4?

Even better, how?

Onato
  • 9,916
  • 5
  • 46
  • 54
sol
  • 6,402
  • 13
  • 47
  • 57

3 Answers3

126

Go to Xcode preferences, and open the Behavior tab.

Tell Xcode to open a tab called "Debugger" when "Run Pauses" or "Run Starts". Then run it, and break that Debugging tab out into another window (drag it off the tab bar into its own window by just letting it drop outside the current window). Now reform it to your hearts content; it will stay that way. Also don't forget the little controls at the top right of the console window that slide the local variable display out of the way so you can have a full-width console on demand. I am not sure about keyboard shortcuts for that yet.

I usually keep the Debugging tab and one other tab in a separate window, for debugging tasks, and all my other editing tabs in a different window (and the debugging window on a separate monitor with the simulator). With the settings above it also means that, while editing a debugger reaching a breakpoint, it will not interrupt my editing by suddenly bringing forth the console.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Kendall Helmstetter Gelner
  • 74,769
  • 26
  • 128
  • 150
  • 4
    The issue here is that when you want to close the project you need to close the debugger tab first or otherwise Xcode will consider it the "main" window for the next time you open the project and you ll end up with a full screen output window and no files visible when reopening the project. – Joris Mans Apr 17 '11 at 14:32
  • 2
    I just quit XCode when closing out projects, when you re-start it will open both windows. Not perfect to be sure. – Kendall Helmstetter Gelner Apr 18 '11 at 17:30
  • Just to add to this, when closing a project out just use "close project" from the menu and the multiple project windows will close. No need to quit XCode itself. – Kendall Helmstetter Gelner Aug 11 '11 at 16:50
  • I have recently upgraded to Xcode 4.2 and can't seem to figure out following these instructions. Can you confirm wether this still works with Xcode 4.2? – neoneye Nov 09 '11 at 12:19
  • Yes it's still the same for 4.2, although these days there's a direct "Behaviours" entry also from the main XCode menu (it's also in preferences still). Go to Behaviors, and you should find Entries for "Run Pauses" and "Run Starts", then follow the directions above. – Kendall Helmstetter Gelner Nov 09 '11 at 19:03
  • In xcode 4.2 I see a thing called the "debug area" appearing at the bottom. I can switch this on an off, and I have the option to "show only the console" (hiding the "variables view" to give more screen width) but I don't seem to be able to break this away into it's own window by dragging. Am I looking at the right bit? – Harry Wood Dec 09 '11 at 14:48
  • 2
    You just have to tell the system to open the Debugging window in a different tab as I outlined - then you can drag that tab out into its own window. Once you have a debugging specific tab you can customize it however you like and it will stay set the same way. – Kendall Helmstetter Gelner Dec 09 '11 at 19:41
  • 2
    Aha I see... In preferences->behaviours we can tell it to open a tab with a name which we happen to call "Debugger. Then when that first opens we can set it up to only have the output log (or whatever) and to be a separate window. – Harry Wood Dec 15 '11 at 22:31
  • 1
    Yes, exactly, each of the windows always remembers state. You may also want to turn off some other behaviors about automatically showing variables (which is half the log window when opened) – Kendall Helmstetter Gelner Dec 16 '11 at 06:08
  • This seems like the best answer possible. Someone posted the same answer with a screenshot of the prefs window here: https://stackoverflow.com/a/19150680 It's a nuisance to do these steps repeatedly, but hey that's exactly what one would expect, given it's Xcode we're talking about. – original_username Jul 23 '18 at 19:10
28

Sure, create a new tab, drag it off the original window, and expand the debugger area to be the whole tab. Now, whether Xcode will remember that tab and its placement is another matter. File a bug with Apple to let them know your displeasure.

Jon Shier
  • 12,200
  • 3
  • 35
  • 37
  • 1
    ok, that's a tiny bit better, but far from ideal. I want the debug window on a 2nd monitor so I can actually, you know, reference the source code while looking at the debug output. Does Apple really think that there are no developers that use more than one monitor? – sol Mar 15 '11 at 01:00
  • 2
    Xcode 4 has been written with the gazillion inch monitors Apple sells in mind, more than with smaller multimonitor configurations, or so it seems. I hate it too :) – Joris Mans Apr 17 '11 at 14:27
  • I use it primarily with Spaces, when you break things out into different windows it's pretty usable on small monitors I think... one key is the ease of folding and un-folding the sidebars. – Kendall Helmstetter Gelner Apr 18 '11 at 17:33
  • Apparently arranging windows as you want and dismissing them with "Close Workspace" gets Xcode to remember their placement better for that project. Something to try. – Jon Shier Apr 21 '11 at 00:16
  • @sol What's still unsatisfactory about this solution for you? Is it that you still have the buttons at the top (Run, Stop, etc) taking up space? – funroll Nov 06 '12 at 15:38
7

Taking jshier's advice a step further, you can do File -> New Window, and expand the debug window to take up the entire window. But you have to manually expand it every time you open it. Ugh.

sol
  • 6,402
  • 13
  • 47
  • 57
  • Also you can Hide Toolbar in the New Window if it is showing, to further isolate the log and free up some space. – Tony Adams Feb 27 '13 at 16:36