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.
Related
My Intellij Debugger window went missing and I can't find any resources on how to get it back, the closest think I can get to my problem is a missing console window but that doesn't help. So I'm hoping someone here can help me retrieve it.
This pic shows a normal Intellij IDE (that I got from my friend) that shows the tab that's missing for me (in red) and the area in which this tab normally shows (in yellow).
And this pic shows my IDE with the missing Debugger window.
I also opened Intellij's help dialogue which claims that the window will show up when your code hits a break point but that didn't do it for me either.
Try the "restore layout" button at the left toolbar of the debugger toolwindow
Showing a tool window:
"Choose View" | "Tool Windows" | "Debug Tool Window" in the main menu.
It as simple as that.
There are multiple other things you can try, look here:
https://www.jetbrains.com/help/idea/manipulating-the-tool-windows.html#show
For example reset your Tool Windows:
You can return to the default workspace layout by choosing "Window" | "Restore Default Layout" (Shift+F12).
To enable the debug window
Click on View -> Tool Windows -> Debug
Or press (Alt+5)
This is not an answer to the specific question asked but a possible solution to My debug window has disappeared!. My situation was actually with Android Studio but should apply elsewhere.
My symptoms were:
I use multiple monitors and after a system crash my debug window
vanished.
Before the crash my debug window was in window mode on a separate
monitor. After the crash it was gone.
There was no Debug tab showing on the main window.
The Debug entry in the View menu was greyed.
The solution that finally worked was to set a break-point at a location I knew the code would hit, debug my project and make it hit the break-point. The Debug window magically appeared.
Remember to reposition the window correctly before exiting.
Try button on the right (there should be debugger, console....)
Try to Restore default layout in console/debugger screen. Its give in image please do check.
Remove the dev option from run/debug configurations from Command line.
You would have undocked, just look for "dock" sign, click on it.
Now debugger will restored to default view
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.
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
I accidentially turn on this mode and want to return to previous setting. How can I do this?
Not sure about VS2010, but in VS 2008 Go to Tools->Options->Debugging->General and uncheck Show disassembly if source is not available.
Tools->Options->Debugging->General-> Uncheck "Enable address-level debugging->Show disassembly if source not available"
All debugging options are in the Debug menu => Option & Settings. Could you explain your issue a little more precisely?
Either way, look at the different options available here, in the Debugging tab.
I believe you can turn it off in the same way that you turned it on:
On the Debug menu, choose Windows, and click Disassembly.
I'm just starting out with Cocoa development in Xcode, doing the hello world example. I'm up to step 6 of the section "runtime debugging", which is
Using the Step Over button in the debugger toolbar, begin stepping through the code. As each line of code executes, you can examine the program’s state. The value of a variable is sometimes drawn in red to indicate that the value was modified in the last step.
Notice that the debugger pauses before executing the indicated line. After each pause, you can add additional breakpoints or choose Debug > Restart to terminate the application and start a new debugging session.
now what I've been pulling my hair out for over the last hour is the fact that this debugger will only show me assembly code. I can manually select my source code file, but as soon as I click "Step over" I'm right back in assembler view. I can't for the life of me figure out how to turn the assembler off, and make it show me my source code!
I know this article is a hundred years old, but in case anyone is wondering how to address this issue in more recent Xcode versions (as opposed to Xcode 3), you'll find the appropriate setting labeled Always Show Disassembly under Debug>Debug Workflow in Xcode 6 and up. Ensure the option is NOT checked.
In Xcode 5, the option was labeled Show Disassembly When Debugging under Debug>Debug Workflow. Ensure that "Show Disassembly When Debugging" is unchecked.
Back in Xcode 4, the Show Disassembly When Debugging setting was found under Product>Debug Workflow. Again, ensure that the option remains unchecked.
This was driving me crazy, too.
NOTE: The information above is still valid for Xcode 14+. I've applied updates to this answer as new versions of Xcode have been released. Fortunately, the option has remained unchanged since Xcode 6 (so far).
There are two other things to make sure of:
That you're looking at one of your own functions/methods. If the stack frame you're looking at is a function or method from one of the frameworks, you're going to see assembly no matter how you have Xcode configured.
That you are running a Debug build. Strip debug symbols (as in a Release build), and you'll be looking at assembly even for your own code, no matter what.
I actually figured this out before I posted, but I wanted to save others potential future headaches, (and also in case I forget later) as I could not find the answer to this by searching stack overflow, but I did find that I'm not alone.
From the run menu, select "Debugger Display" > "Source Only", or "Debugger Display" > "Source and Disassembly"