Don't show Xcode navigator on run - xcode

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.

Related

How to debug the preview in Xcode 13 or later

I can't work out how to debug a preview in Xcode 13.
Documentation for Xcode 11 and Xcode 12 has conflicting advice like
right click the run button and you'll get a menu
control/command/option click run
long click the run
I've tried it all - and put breakpoints on almost every line of code in my preview / view / init functions - and however I hit run, it just... runs... - so I see the preview, but no breakpoints are hit - no print statements come out in the console - no cool expanded ui display appears - and no menus appear.
Any ideas?
It looks like Apple has chosen to remove the ability to debug Xcode Previews in Xcode 13 with no guidance as to if/when it will be brought back.
Hi,
The ability to use a debugger for previews has unfortunately been removed. > As you pointed out, the workaround is to run the app in the simulator.
Sorry for any inconvenience caused!
Posted 1 month ago by Frameworks Engineer 
https://developer.apple.com/forums/thread/683773
You can attach the Debugger to the Preview Process like explained here
Deprecations
Xcode 13 no longer includes a menu item in the Previews
canvas for debugging a preview. Instead, use the Debug > Attach to
Process menu item to attach the debugger to your previewed app.
(73981969)

Xcode simulator just show a quarter desktop

I create a simple single-view application project, then run it. The simulator shows a quarter desktop. so strange, I want to see a full-screen result.
Try hitting command 1. Or if that doesn't work then see if in the main file (very top of navigation bar) if the box is checked where it says something like require fullscreen or show in fullscreen

Xcode - can't find Debug View Hierarchy button

I can't find the Debug View Hierarchy button in Xcode.
I've read this:
Xcode 6.1 can't find 'debug view hierarchy' button
and launched my app on the iOS8 simulator but still no luck. Something to do with the Architectures perhaps?
Here's what I'm using:
Check to see if accidentally you have disables User Interface debugging. You can find this option in Edit scheme, check out the screenshot:
Then this button will be back:
Hope it helps someone.
In your scheme settings, accessible via Product>Scheme>Edit Scheme, there is an option called debug executable,
Enable it to make the debug buttons available
On the left side of the debugger, in the toolbar below:
It is the second icon from the right in the image. It might be black or greyed out depending on whether Xcode is in focus or not.
It works fine on device and simulator. Either click it to break or break using a breakpoint/debugger and use it.
Thanks #Tibin Thomas and #Khaled Barazi. The Debug View Hierarchy button only appears if you have
checked the Debug executable box and
run your app on the simulator.
By the way, in Xcode 13.1, the button have already become as following icon

Xcode: On debug, is there any way to prevent it from opening the navigator on the front-most window?

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.

Clicking "Run" in XCode runs my command line app, but the console windows does not appear

Well, the title pretty much sums it up, really. I've only just started toying around with XCode and stumbled upon this while coding the obligatory "Hello, World" app. When I click "Build And Run" (or just Run), my app runs, but XCode doesn't bring up the console window, so I can't, for example, see its output.
If I double-click the executable on the Detail View list, the terminal window appears as expected.
I suspect I'm doing something stupid, but don't know yet what it is. I'm running XCode 3.2.2 on Snow Leopard.
Thanks.
⌘-, select debugging, and change the "on start" value to "Show console & Debugger."
You can choose the other options, depending on your style. See the debugging guide for more details.
-S!

Resources