correctly debug in XCode 4.4 - macos

on XCode 4.2 when a breakpoint is active while debugging, if I put my mouse pointer over a variable name (into the source code) and a yellow tooltip appears and let me able to view the variabile value (for base type like int, float, and other).
Yesterday I update XCode to 4.4 (for testing my apps on iOS 5.1.1) but when the game stops into a breakpoint, and I move my mouse pointer over a variable, no yellow tooltip was showed.
I think this "fast debugging" is too important, because a programmer, else, for view class fields, need to:
1. Selecting "Local" instead "Auto"
2. Open 'self' object
3. Searching the variabile to view value
this is very slow ...
Anyone know how to solve this issue?
thank you

You may simply need to clean your build folder and have Xcode re-index the project. Hold down Option while selecting the Clean option from the menu, it'll change into Clean Build Folder.

Related

Xcode assistant editor won't show some of the code

First of all, I would like you to know that the class IS set to the correct file in each ViewController - I know that because it did work before, but then I got a "crash" in Xcode that blinked quickly without me being able to read it before it went off again.
MY PROBLEM IS:
I have a lot of ViewControllers in my Xcode, everything was working fine, I was making some more features to the ViewControllers.
Then I got the "crash" as mentioned above, and it would not show any of the files/classes related to their ViewController in assistant editor.
Assistant editor just said: No Assistant Results. Then I read that I could just show the files inside my XCode project and delete project.xcworkplace and xcuserdata. And I thought it worked at first, but it did not work on every viewcontroller unfortunately - only on some of them.
Now, I still have plenty of ViewControllers left to edit that aren't working, and I would hate if I had to recreate every single one.
Does anyone have a better solution to this? I really hope you do :-)
Make sure you set Automatic not Manual.
There was some related answer but I can't find it. Anyhow: what I do to fix it is to uncheck the Target Membership in the File Inspector for the XIB and then turn it on again. That fixes the issue (in most cases) for me.
Also try restarting/clearing the different caches of XCode.
I was similarly not able to view code/classes relating to the View Controller. In my particular case, it appears i might have caused the issue- I turned OFF Indexing because Xcode was running terribly slow and around that time I started getting the issue and the message “No assistant results”.
To resolve this in my case, I turned indexing back ON and set the Assistant editor to “Automatic”.
To turn Indexing On or Off, open up the Terminal using either of the below commands-
Turn Indexing OFF:
defaults write com.apple.dt.XCode IDEIndexDisable 1
Turn Indexing ON :
defaults write com.apple.dt.XCode IDEIndexDisable 0
From accepted answer regarding Indexing: Stopping xcode from indexing
xcode 9.0
Open project.
Click on "Show the assistant editor".(top right side middle button - circle shape)
Code was show after do second step.
I cloned a project and found that I have the same problem. But all I did to fix it was to just sign the app at Signing and Capabilities and the option for the right View Controller pops up in the top bar of the Assisntant in my View

Xcode Breakpoint is off

I am incorporating some C code in my objective-C project. My break point is off in that C part of the code. I noticed on invalid breakpoint with xcode 4.3 that some optimization can mess with it. But I'm not sure where the optimization option is on Xcode 4.3?
Do you mean you just want to change the build settings for optimization in Xcode?
If thats what you mean then you can click on your project to bring up the build info. Select your target on the right of the build info screen, then type optimization into the search bar on the upper right corner of the window. It should show you right where to change it.
Cheers

Change code without relaunching Xcode

I've heard that the Xcode has an option to change the code and attach it directly to the existing build (run in the simulator for example).
It would be great if you have to move through many screens in the iOS application to get to the same location as before (menu1 -> menu2 -> menu3 -> content)
Could you please give me some info - what is the name of that process?
How can I do it?
How does it really work? - Let's say I've two UIViewControllers - one is with the table (let's call it MenuVC) - list of objects and once the cell was selected the second UIV.C. (let's call it DetailVC) is displayed showing details of that object. Will I've to go back to the MenuVC, do some magic tricks with Xcode and display the DetailVC again by pressing the cell? Or will the DetailVC be changed by itself but remembering the properties I've passed using MenuVC?
That feature was called "fix and continue", but it fell into disrepair and was removed from Xcode 4.

Xcode: How to get page up and page down to move cursor?

This is a mac thing (because text edit does the same) but I just want to change this in xcode.
I'd like the cursor to move when I hit the page-up and page-down button. Kind of like the way windows or linux work. I know I can hold down the "option" button and then go page-up, page-down and it works - but I don't want to hold the option button.
I tried fiddling around with key bindings in xcode but couldn't get it, anyone know how?
In preferences, go to key bindings, type "page" in the search box, look for Page Down (Selection) / Page Up (Selection), click there and hit your pgdn/pgup keys.
Delete the pgdn/pgup keys from Scroll Page Up/Down.
Whit Xcode 6.1 (and >) is quite different, but similar to Colin's answer.
Xcode > Preferences > Key Bindings
Search for "Move Page Up": by default it's bindend with Alt+PgUp
You can change your binding simply with PgUp.
There may be conflicts, resolve it is suggested.
Than repeat the same for "Move Page Down".
Install KeyRemap4MacBook and life will be good. If you have a PC/Mac/Linux environment the MacOS keyboard inconsistencies can be a real pain. We have all of our Macs setup to work as PC keyboards work. Now switching from one system to the other several times a day is not a problem.

View internal std::vector data when debugging in XCode 4

On breakpoint XCode shows only aa array of vector members. So I can't view actual std::vector members, such as _M_impl. As I remember, there was this ability in XCode 3.x.
I need this data to set "Watch adress of ..." to check when it will be changed.
You can right-click in the xcode 4 variables window and select "Edit summary format...". This provides you with the same functionality as xcode 3.
That said, I still have yet to figure out how to inspect STL containers in xcode.

Resources