complete debugging in xcode 4.2 - iphone

I am using xcod 4.2 now and its not showing the complete debug information if my application crashes. i was using xcode 3.5 earlier which shows the complete crash stack.
Is there any option to activate this option please update me?

I highly recommend this setting in the Behaviors tab of Xcode preferences:
. Create a new tab in your workspace window and rename it "Console" by double-clicking on its title.
Now when a run of your application starts, the debugger view will automatically display.

It's displayed in the console. There's a toggle at the top (near the organizer icon) to display the console, variables, or both.

If you want to see the call stack in the console . . . well you can't, it seems, but you can set a break point for all exceptions by opening the breakpoints navigator and hitting the plus button then selecing exception breakpoint.
It's not great but it should help.

Related

Eclipse - Two Console Windows display the same output

According to this thread I added a secound Console window to my Eclipse. I want to Debug two applications at the same time, so I selected the first application in one console tab and the other application in the other one.
Unfortunately whenever I start one application both Console windows switch to that one. They always switch to the application which had the last output..!
Thank you!
EDIT: After reopening the windows a few times it worked! Its kinda buggy but it works now. Thanks.
Eclipse have two options in the view's toolbar:
One is a Show console shen standard out changesand other Show console shen standard error changes.
Keep both deselected, so you can control which console do you want to view...

Why in Xcode 6 doesn't work Assistant Preview?

Sometimes in Xcode 6 Assistant Editor -> Preview stops working.
Showing just "No selection" even if no errors and Storyboard is ok.
Why does this happen?
The reason is "?" (questionmark) in Project's name (maybe there is a bug with other symbols – didn't check it).
You can try to rename Project or just create new one with name without "?" in it.
You must to Kill Xcode from processes for complete and then open it again. You can do it with Activity Monitor o CLI. Voila! - Preview is working again.
Don't just close Xcode keeping the app working. Sometimes also works closing with CMD + Q.
I had similar problem, but fixed it
You must open the xib or storyboard file in both assistant editors. Click the navigation button in the second editor (either the bottom or the right editor, depending on how you stack the assistant editors) and choose Preview to get the preview to appear.
thanks to
http://meandmark.com/blog/2014/09/xcode-6-no-simulate-document-in-interface-builder/comment-page-1/#comment-2883
I have played with Xcode 6 for a while and I encountered similar problems occasionally. I never used special characters in project or class names but the problem sometimes happens.
Now I have to test all ViewControllers at starting point to see if the Assistant Editor work. If not, I will just delete the class file and recreate the same one, it usually fix the problem.
Hope this can be fixed soon.

Debug rhodes framework

I'm newbie to ruby and rhomobile.
I'm debuggind succesffuly using the simulator, I can set breakpoints, etc... All works fine except I can't debug inside the framework code.
How can I debug through the framework code in a rhomobile app? How can I configure rho studio so I can debug inside the framework?
I'm a newbie with ruby and eclipse.
More detailed:
My problem happens when I try to debug functions inside the framework. For example: I put a breakpoint in a model.find(:all). The debugger stops here, but when I want to debug then find method it doesn't enters it, it simply executes and continues in the next instruction. In keys terms, I want to make a step into, but it makes a step over. If it helps you, in edit mode, when I press control+left mouse button over a "Rho::RhoController" in a line like this: "class TestController < Rho::RhoController", it doesn't open /rhodes-3.2.1/lib/framework/rho/rhocontroller.rb, where the source code of this class is.
First you need to install rhostudio, once ure done with that. You need to run your application through Rhosimulator which is a really fast simulator than native blackberry, android & ios simulators.
Please follow these steps :
Select Run » Debug Configurations… from top menu
Find ‘Rhodes Application’ section on the left and add new (or modify existing) configuration
On ‘Common setting’ tab select a project by clicking ‘Browse…’ button next to ‘Project name:’
Select ‘Rho simulator’ as the platform
Click ‘Apply’ and then ‘Debug’
Its good that you have already added breakpoints in your .rb files which you can now view in log in Console window.

nslog stopped working in xcode

I have a strange issue and possibly a bug. My NSLog statements have stopped working completely, they do not print even in view did load, application didfinishlaunching etc. The have all turned a brown colour (the same colour as a pragma mark in xcode) and they all have a warning saying 'expression result unused'. Has anyone ever seen this before or know what to do? Am i running in some kind of weird mode? Im running xcode 4.0.2.
Many thanks
Jules
for completeness, I had the same problem and the answer was different, hope it helps someone else who bumps into this post:
I had a framework (an Amazon one) redefining NSLog, went there (Cmd+Click on the Brown NSLog) and commented out the redefinition...
The actual problem was the release_build set to 1. So it wasn't recognizing nslog, as you said it was set for a release build.
I had the same issue :
what worked for me is given below:
Remove the derived data folder
After removing derived data perform the clean action (You can see this option in the product menu)
Quit the Xcode and start it again.
And this did the trick all my NSLog were working fine.
Hoep this helps
Ensure that scheme chosen corresponds to Debug mode because sometimes the pch file might have some definitions such that logging is done only in the debug mode
(Scheme is on to the left of the place where you select iPhone Simulator / iOS Device)
In the view select Debug Area
(There are 3 view buttons, on the top right hand corner of Xcode, press the center button)
Select "Show variables view and the console"
(In the debug area (bottom) there are ther 3 buttons, press the center button)
I had the same issue and the problem was that I was building an Ad Hoc version (schema was for Ad Hoc build). The warnings disappeared when I built for debug.
Try changing the dropdown menu at the bottom of the console to 'All Output'.
if you are using libraries like 'KScan' or 'iKEA' or 'kdc-scan', so it can happens that, they will call methods like this one 'redirectNSLogToDocuments'.
in my case the object of 'iKEA' call the method 'CheckIfDeviceConnected' and this one redirect all nslog outputs to documents. after commenting out, all nslogs works again :)
hope this will be useful for some one.
some steps :-
1) "Clean all targets" or delete your build and rebuild again.
2) If step 1 doesnt work , reinstall xcode

How to see NSLog() from console app when using instruments

I'm using instruments for allocations, but want to see my NSLog messages. In another post they mentioned to look inside /Applications/Utilities/Console for the messages. I can't seem to spot any of them. After you open the Console App, where would you look?
You can view the console of the device using Xcode Organizer.
In Xcode 6, the "Devices" tab was removed from the Organizer into it's own window. To view the console log, you now have to click the tiny little triangle in the lower left-hand area of the device information.
Alternative to Black Frogs answer, you can also use the integrated console from your mac directly without Xcode. All output is forwarded there. Just do a spotlight search (CMD + Space) and type in console.
If you want to use the Console Application, the Xcode log can be found under the FILES section in the Log List (If not visible:Menu -> View -> Show Log List). Look for
~/Library/Logs/iOS Simulator/6.1/system.log
This is actually just a reference to the file system. So you could to a
tail -f ~/Library/Logs/iOS Simulator/6.1/system.log
in the Terminal as well.
Update:
Another option in some newer versions of Xcode can be found in the Xcode 'Debug' menu. Look for the entry 'Open System Log...'.
As of Xcode 6.3.1, I couldn't find the log in any of the above locations when running the Allocations instrument. For me, in iOS Simulator (not Xcode), click Debug -> Open System Log... to get the NSLog messages normally appearing in Xcode.
In case you need it, this log is kept in Library/Logs/CoreSimulator/[device name]/system.log. To get [device name], go to Xcode, Window -> Devices and find the device that you are currently simulating. Look for the Identifier. Compare that against the folder names in Library/Logs/CoreSimulator and you should find a match.