Upon hitting a break point in XCode it switches the left most panel to the Debug Navigator. If I then stop debugging the panel maintains the Debug view and contains the text...
No Debug Session
Then I like to manually switch the panel back to the Project Navigator in order to carry on developing.
Is there a way of configuring XCode such that it automatically switches to the panel layout it had when I started debugging the app?
In Xcode, go to Xcode -> Behaviors -> Edit Behaviors. Select Running | Pauses in the left section of the dialog. In the main section, choose Show Project Navigator.
The Behaviors feature in Xcode is quite powerful for customizing the workflow. I actually like to have separate tabs for editing code, building and running. You can configure the behaviors to switch to the appropriate tab (which is configured to your liking) whenever you build or run the app. Really useful. I think I've learned about it from one of the older WWDC videos about the efficient use of Xcode.
Related
(By way of background I have been helping a local blind child learn coding. He's switching schools from a Windows based school to a Mac based school so I am trying to familiarise myself with VoiceOver on the Mac.)
Using just the keyboard (and with VoiceOver running) how do I switch focus between Xcode's main editing area, the project navigator, the issues navigator, and the scroll bar overview (we sometimes end up in the last one by accident!)
The shortcuts you are looking for are the following
The project navigator is: ⌘+1 (Cmd-1)
The issues navigator is: ⌘+5 (Cmd-5)
Main Editing area is (once you have selected a file in the issues or
project navigator):
⌘+J (Cmd-J) and, after
release, ↵ (Return) or
⌥+⌘+` (Opt-Cmd-`)
The Mini Map: ⌃+⌘+⇧+M (Ctrl-Cmd-Shft-M)
Hope that helps.
I'm trying to figure out how to use Xcode in a multi-window setup. I would like to have one window be my main window, and then have others that I use to do occasional spot editing. Here's the rub: I never want to have the navigator (or the debug console, for that matter) open in those other windows. I only want the navigator and console to open in the main window.
Right now, when I run the app the debug navigator and console open up in whichever window is frontmost (causing me to have both the main window and the secondary window with console pains and navigator open). Is there anyway to prevent the console and issue navigator from opening on the secondary window while preserving this behavior for the main window?
I'm not sure I fully understand what you want - but you can configure some of these things in the Xcode preferences under "Behaviors". Under "Running" you can click on "Starts" and it will show you the behaviors for when you run your application. You can set it to show a particular tab in the active window or a separate window. You can set up that tab to contain just the debugger. If it does show the debugger in the other tabs, you can minimize the debugger panes, and I believe it will save that state for the next time it launches. See here for more details.
Go to Xcode -> Behaviors -> edit behaviors. Now under build and running uncheck shows Navigator.
In Xcode Preferences > Behaviours > Runnings > Generates output, uncheck Show debugger with Current Views.
Whenever I hit a breakpoint and step into or over lines the assistant editor shows itself. I've investigated this in XCode > Behaviors > Edit Behaviors, but I can't seem to find where such a behavior would be configured.
I need to disable this because the my screensize of my macbook air makes reading code difficult with two editing windows.
In the Edit Behaviors configuration box:
On the right, among the actions, there's a check-off for
showing/hiding various editors, including the Assistant Editor.
On the left, among the categories, there's Pause under Running.
If that item was checked off, it would start up the Assistant Editor during pauses/breakpoints in the debugging session.
I have a dual-head setup for Xcode that I use for developing on iOS, with a split-pane editor and counterpart assistant on each screen. When I run a project it throws that away and takes over half my (active) screen with the debug navigator and console -- is there a way to have Xcode not show those on run? Or, even better, always show them on a particular screen?
Preferences->Behaviors. The default behaviour for "Running: Generates Output" is to switch to the debugger view and show the console - either turn that off or configure it to do something else.
I was watching a video lecture from iTunes U., where instructor showed how one can take a debugger section of the Xcode and was able to pull that window away from the main.
Unfortunately, video showed instructions on how to do it in Xcode3. How might one do it in Xcode4?
How can one either detach a debugger section or, possibly, configure preferences to do it automatically?
Open a new tab, show the debugger (cmd-shift-Y) and drag the divider all the way to the top. Close the navigator (cmd-0) and inspector windows (cmd-opt-0), then drag the tab off into a new window.
If you name the tab before you tear it off, e.g., "Debugger", then set up a Behavior in Xcode's preferences ( Preferences -> Behaviors -> Run Starts -> Show Tab "Debugger" ), it'll show that window when you run your app. It'll even recreate it if you close it.
If you have access to the WWDC 2011 videos, "Maximizing Productivity in Xcode 4" has a lot of great info.
Here's a screenshot before tearing the tab off:
I know it's a little too late, but I'm going to be borrowing from this answer. Go to your preferences, go to the behaviour tab. Change the running behaviour to show a new window.
If you don't want the window to have an editor or toolbar, you can customise it that way too.
Xcode 11
Change behaviour
Xcode -> Preferences... -> Behaviors -> Running -> Starts -> Show tab named <tab_name> in active window
After that <tab_name> tab will be opened automatically
To create a new tab manually:
Create a new tab
File -> New -> Tab
Rename the tab
Window -> Rename Tab... -> <tab_name>