Debugging in Xcode - xcode

I am just getting into Cocoa at the moment. I have set up Xcode to show the Console and Debugger when debugging. However, when I have killed the app Xcode does not return to the project view. It stays in the Debug view, showing the debugger and console.
Is there any way I can get it to automatically return to Project view? Sorry, I may not be using the right lingo here but I hope you guys understand what I'm saying.
Cheers,
Dany.

There's no way to get it to automatically return after killing the app, but Cmd-0 will return you to the main project management view, whatever that's called.

If you didn't close it, use Exposé (F10 or Fn + F10 on your keyboard) to bring to visibility all of Xcode's window (it actually works for all applications). Otherwise, Cmd + 0 will also bring it to front.

Related

Xcode is giving me some Thread 1 error, and iOS Simulator is crashing

Whenever I try to run my project (in Xcode 4.6.3), it launces the iPhone Sim., the 'screen' on it goes black, and Xcode displays this same exact thing every time
If anything else such as code of the XIB's I'm using**, I would be more than happy to provide those. Thanks!!
**XIB's I'm using ---- whenever I try to link a button to a view controller (in a .storyboard file) it won't link. I two finger click (right click) and drag, usually, the view controller I want to link will be highlighted in blue, and then I am able to just tap it in the Sim., and it will do a quick animation to the next VC. But it the VC I'm trying to link it doesn't even get highlighted. Once again, I'm running Xcode 4.6.3. Thanks again!!
The picture in your comment says that it crashes when trying to set a key (admissionsButton) for your ViewController object that doesn't exist. This could happen if you deleted a property in code but the IB link still remained. If you open up IB and go to your view controller, expand the utilities window (the right sidebar) and then go to the far right option that shows connections. If there is something there that says admissionsButton, try deleting it.
In order to give you more help than that, I would need to see a more detailed log of where the crash happens.
That message could be for anything during the execution of your code. I would use breakpoints from the moment of launch and step through it using the debugger window.

Don't show Xcode navigator on run

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.

Keyboard events don't work with irrlicht on Xcode

When I run my Irrlicht application in Xcode, I can't use keyboard input:
If I press a key while the application is running, I end up writing that letter on whichever window was opened before the application, for example: I'm editing my code, than I press Build/run, the application opens (I press with the mouse on the window just to make sure it is focused) and than I press a key and that letter is written in the editor window...
I am certain the problem is not from the code, because if I press the top bar of the application's window, press the key, and release the mouse button (in a fast motion) the event gets fired..
Now, from what I read in this link (fourth post), it seems there's an incompatibility between command-line application with Xcode and irrlicht. The guy changed to a Cocoa application and got it to work. I don't know how to do this, since Irrlicht uses lots of namespaces and with cocoa I get loads of problems with it..
Any idea? thanks!
Well after a random search i found this guide:
http://irrlicht.sourceforge.net/forum/viewtopic.php?f=5&t=13890&start=60
Some things were different with my Xcode 3.2.6 (e.g. i had no *AppDelegate.m, *AppDelegate.h nor *.xib file) but easy to get to the end of the tutorial.
In the end i got like 1000 errors, something to do with precompile appkit.h errors, and with a quick search here is the solution for all those errors:
http://www.cocoabuilder.com/archive/cocoa/194905-xcode-cocoa-project-with.html#195211
easy peasy :)

How do you view the console in Xcode3 without switching to Debug view?

I know you can see the console in debug view at the bottom, but I want to see it in the project view as well.
Thanks for your help!
Not exactly what you asked for, but you can make Xcode show the debugger console automatically when you start a debug session by going to the Debugging section of the Xcode preferences and setting the value of the On Start popup to Show Console.

Where is Xcode 3.0's output window?

I'm learning Xcode off a slightly older (10.2) book that deals with Project Builder. I've been using Xcode for ansi C for a while, but I can't find the output window that appears when you Build & Run an app. I am launching my apps from the commandline, but of course that doesn't help me if I want to set breakpoints or something. Where is the program output window that should appear when I build & run. Do I have it hidden or something ? Why can't I find it ?
Shift-Cmd-R brings up the output window.
There are a few windows that you should know about:
Debugger Console (keyboard shortcut = Shift-Cmd-R): This will show you any console output and you can click the breakpoints button to break into the GDB console debugger
Debugger (keyboard shortcut = Shift-Cmd-Y): This is the debugger window that shows your breakpoints with the source and includes table views for local variables and the stack
Breakpoints window (keyboard shortcut = Option-Cmd-B): This is a nifty window to find and manage breakpoints in a project
This cocoaheads talk has a lot of useful info about debugging with xcode.
Hope this helps.

Resources