How do I open the memory browser in Xcode 4? - ios

When debugging programs in Xcode 3, I often used the Memory Browser in a seperate window to view the contents of a buffer change while I step through the lines of code.
As I now started using Xcode 4, I wonder how to open a Memory Browser. I can't find anything like that in the UI. Can anybody provide help?

Select Product > Debug > View Memory while debugging or press Shift-Cmd-M. This will display the memory browser and add an entry for 'Memory' into the Debug navigator:
You can also right-click on a variable in the Debug panel and select View Memory of "*<variable name>" to jump straight to displaying memory for that variable.

I open it when i debug.
I place a breakpoint, right click on an variable -> View In Memory "..." .
It will open in a tab, but you can drag the tab out of the Xcode tab-bar.

As of xCode 12.4 you could open the memory view by going to debug->Debug Workflow=> view memory
And then on the left top click show the debug navigator tab

Related

Storyboard is taking more time to load

Im using Xcode 9.2,Im working in a static tableViewController with the height of almost 1500.When I open that storyboard it is taking more time to load, sometimes it is not opening.So it is very hard for development.I have tried to open this in Xcode 9 and 8 versions.But samething is happened.Any Solution for this?
Open a new Window from the Storyboard and minimize it. So it stays in RAM and won't reload. Working with the storyboard keeps quick and easy now.
This new Window may automatic refresh your build every time while coding for that Do below solution:
For this goto Storyboard -> Menu Editor -> Automatically Refresh View just uncheck it .
Along with
Please do this step:
Go to Preferences -> General and disable Live Issues in Editors and in Issue Navigator

Xcode shows two windows side by side

Hello My xcode is showing the screen in half and also not showing storyboard interface builder. below is the screenshot
I have tried to reset the xcode settings as well
defaults delete com.apple.dt.Xcode
But it didn't work. Please tell me how can I fix this
These three buttons up here switch your view. Select the left one.
You're actually stuck in the version editor (which looks at your version repository compared with your current code.)
Because storyboard UI can't be viewed with the interface, it shows the underlying xml.
Also the keyboard shortcut is command + enter (credit to farzadshbfn)
Try click on "Show Standard Editor" button:
Main Storyboard > Right click > Open As > interface Builder - Storyboard
Click First button to show your view controller.

How to set the exception breakpoint in xcode 6

hi after crashing i set the exception break point by pressing break point symbol and i choose objective c language while editing the break point. I run it again ,app is crashed ,but it is not stopped where the exception is occurred in xcode6
Thanks in advance.
Ok than try using enabling zombie environment.
Follow these steps:
Click on project name and edit scheme.
A pop over will appear, In that select Arguments tab. See bottom section Environment Variables. You can see + button at bottom part. Click on that button and add varialbe NSZombieEnabled with value YES.
Now from same popover select Diagnostics tab. And mark Enable Zombie Objects.
Click close and again run your project, hope this will track down zombie objects at runtime which cause runtime crash.
See the following steps.
Look into [Navigator] and Click on [Show the Breakpoint Navigator].
See the bottom of Navigator [ + ] Sign. Click on it
Select [Add Exception Breakpoint].
Your Exception Breakpoint are activated from this things.

How can you show the debugger console in "xcode 6"

In Xcode 5 you could show the bottom view and show the debugger console. But in xcode 6 I'm getting no data when running on the simulator. What gives?
Go to XCode -> Preferences -> Behaviors -> Select “Starts” in Running -> Select “Show” debugger With “Variables & Console View”
than select the "Hide or show the Debug area" Button
and Now click on Small Arrow Button
i think it might be helpful in your case.
For more info you can see here.
Nothing of the above worked for me, but Rob´s answer helped me to find the solution.
I had to activate the console in View > Debug Area > Activate Console (shift-command-C)
In addition to Bhumit's answer, you can also choose View > Debug Area > Show Debug Area from the menu bar.
The default keyboard shortcut to show or hide the debug area is ⇧⌘Y (shift-command-Y).
You can click on small triangle at the bottom to see the console.
You can also use the keyboard shortcut ⌘⇧Y

How to track the exact issue for the crash in iOS

When I was debugging my iPhone app, I got an error and the app got crashed. I have added a exception break point but it didn't point any where in the code and crashed in main.m.
Here I am adding the screen shot of the XCode window when the app crashed.
How can I find the exact issue for the crash from this?
Is it possible? Please help.
Enable Zoombie so that you will get the error description in log.
If you edit the scheme you want to turn on zombies for (in the "Product" menu, select "Edit Scheme"), go to the "Run Foo.app" stage in the left panel, and the "Arguments" tab on the right. You can then add NSZombieEnabled to the "Environment Variables" section and set the value to YES, as you could in Xcode 3.
In Xcode 4.1 and above, there's also checkbox on the "Diagnostics" tab of the "Run" stage to "Enable Zombie Objects".
click on EditScheme in XCode. then screen will be show like below. click on Enable Zombie Objects.It will shows error on your log.
Add an Exception breakpoint and the debugger will stop on the line that crashes.
Not sure but reading the registers might help.
First go to Exceptions tab and 'Add Exception Breakpoint' using the + at the bottom left corner.
Then when the app crashes click on "0 objc_exception_throw" under Thread 1
Finally in the console enter:
register read
(you should get a list of registers)
po $rax (normally the exception is in 'rax')
(you should see the exception output on the console)
Hope this helps.

Resources