How to show the Logged Messages window in Xcode
I’m a very new Cocoa user and running into all sorts of problems…
I’m trying to get the content of an Array and found this code to do this.
NSLog(@”array : %@”,collection);
The problem is, I’m not getting any console or tracer window that shows this ‘echo’
Is there another command I should use, i’ve tried opening all windows but I don’t see the message that should show. I know the function that this call is in is executed, so the reference is right.
Thanks and sorry for these beginner questions… Using stackoverflow is way faster than reading through all the documentation apple has regarding the subject.
- Count number of items in an array with a specific property value
- Find Duplicate Elements In Array Using Swift
- Pin an annotation to mapView with the saved coordinates in CoreData
- Runtime error when using CoreFoundation objects in a swift NSObject subclass
- Union of two array of two different Objects
- Does joined() or flatMap(_:) perform better in Swift 3?
5 Solutions Collect From Internet About “How to show the Logged Messages window in Xcode”
When Xcode runs your project, the editor changes to show a little black button with the letters “GDB” in it. Click on that to see the Debugger which has the console in it.
Oh, and I would read Apple’s documentation. It’s not that bad.
From the ‘Run’ menu, choose ‘Console’ – keyboard shortcut is Shift-Cmd-R.
If you want to see it every time you run your application select the “Debugging” tab from the preferences window and change the box that says “On Start” to “Show Console”.
Additionally i like to check the “Auto Clear Debug Console” checkbox which will clear out the text of the output on starting your application.
In the Xcode menu hit Run – Console. This is where NSLog / print / printf etc statements output.
The key command is Command + Shift + R.
The cocoa toString() method is called description as well.
NSLog(@"array : %@",collection);
NSLog(@"array : %@",[collection description]);
Which will then call description on each of the collections elements.
In later versions of xcode, do shift + cmd + R.
Or go to View -> Debug Area -> Activate Console
- Return multiple values from a function in swift
- How to Open a Specific View Controller On didReceiveRemoteNotification when application is in back ground
- error creating custom tableview separator
- Create PDF of dynamic size with typography using UIView template(s)
- Tool for transitioning to ARC
- How to cancel previous animation when a new one is triggered?
- porting iPhone openGLES app to OSX?
- Swipe gesture in Swift 3
- Linking View Controllers through button
- Set non-owned window always on top – Like the app “Afloat”
- Is it necessary to use autoreleasepool in a Swift program?
- Using Instruments to test an iOS app without having source code to the application
- How to update a UI label from a non UI thread in iOS
- Checking memory allocation in Instruments
- How to configure email settings for Xcode Continuous Integration