The source code isn't shown in debugger window in Xcode - xcode

My Xcode always show me the ASM code of my source code file in the view of the debugger even I have the source code file. And I also do not know how to fix the problem. Can you help me.?
Version is 4.3. Thanks a lot.

Uncheck in Xcode menu Product:Debug Workflow:Show Disassembly While Debugging

Related

How to Save Your Breakpoints so they are part of the Source Control committed Projects

Do you know how to backup your Xcode breakpoints using Source Control? Lately I have been using a lot of breakpoints to print out which part of the code fired. I had some trouble with a project and had to restore from my online Git repo and lost 85 breakpoints which really sucks. I had the same issue when I tried to share the project with another developer.
Here's a screen shot of what I mean about printing things with breakpoints.
The unchecked boxes here may be the answer but I don't know.
If you could please enlighten me that would be helpful. Thank you.
I was surprised to find that sharing breakpoints is actually a feature of the IDE. Here is some Apple documentation on the matter.
From the article:
In the breakpoint navigator, Control-click the breakpoint.
From the shortcut menu, choose Share Breakpoint.

Is Xcode debugging/crash report in Swift broken?

I've been working with Swift for over a year now and things seems to be only getting worse with each new Xcode release.
Is it only here that crashes in a app aren't reported correctly? Most of the time it's only SIGBRT or EXC_BAD_INSTRUCTION on main() (yes I use a main.m in my project):
That's not helpful. If I don't add an 'All Exceptions' breakpoint, I can't find where the crash happened. I just got used with not having any help at all from LLVM about any errors on my Swift code, and even then:
Is there something I'm missing here? I feel like back when I was programming with Objective-C things were much better.
UPDATE
I found this solution: https://stackoverflow.com/a/27356008/447360
Which helps sometimes:
Still looking on how to get the exception/error message to show up (again) in Xcode.
Ok, so I finally was able to improve the debugging info for breakpoints.
Basically you should create a "All Exceptions" breakpoint like this:
This is for Xcode 7+ only.
Credit:
http://natashatherobot.com/xcode-debugging-trick/
https://stackoverflow.com/a/31471663/447360
https://stackoverflow.com/a/4535007/447360
Check if the "Debug -> Debug Workflow -> Always Show Disassembly" is turned off.

XCode 4 errors/warnings dont jump to code when i click them

Hey this is a small issue with XCode 4 that is annoying me. When i click on warnings or compile errors on the left hand panel, I am not taken to where the error is on the code. This used to work in XCode 3.x but no more.
Anyone else seen this?
Ive found a way that works more often than not...
In the left hand panel, click on the "Show the log navigator", its the button which looks like a speech bubble. Now underneath will show the logs for every build. This is like the old Xcode, and will show errors/warnings. When you double click on the errors it will open the file to the line of the error.
I had this same problem and fixed it by switching the compiler from LLVM GCC 4.2 to LLVM Version 2.0.

View disassembly in XCode 4 (or Xcode 5 or Xcode 6)

I'm having trouble finding much in the way of information about the new XCode layout. How can I view the disassembly of my source file, rather than just the C++ code?
In Xcode 4.2 (and Xcode 5), you can see the assembly or disassembly for a file by:
Showing the assistant editor (command+option+Enter is the default shortcut).
In the JumpBar, select the tuxedo icon and select "Assembly" or "Disassembly" from the drop-down list.
You can view the Assembly for a file whether or not you're running the application. Disassembly is only available when the application is running and being debugged.
Follow these simple steps inside of Xcode:
You can also display disassembly by navigating to:
Debug->Debug Workflow->Show Disassembly while debugging.
This will display source and disassembly in the main window view.
On Xcode 6 you can go to the menu "Debug -> Debug Workflow -> Always show disassembly".
From what I read in a very thorough XCode 4 review (http://fireballed.org/linked/2011/03/09/xcode-pilkington/), the ability to show a file as assembly code is now gone in XCode 4. I guess you could always set a breakpoint in a method, and look at it disassembled in the debugger console with something like the "x/100i" command to treat print out the next 100 instructions in assembly, but that is a lot less convenient.

cannot see source code section of xcode debugger

In the XCode debugger, I can only see the disassembly code, I do not see the section for source code. I tried the "source code and disassembly" options in Debugger display. Nothing changes. Can someone please help me with this?
You're never going to see any source code that you don't have access to. If you're stepping into Apple's territory (or any other vendor's for that matter), all you'll get is disassembly.
Make sure you check the menus. Visit "Product" > "Debug Workflow" and make sure "Show Disassembly When Debugging" is off. Some rabbit activated it for me...
You get to the source code by clicking on the method name in the thread window.

Resources