How to see the code in debagging state in Xcode? - swift

I might not formulate the question correctly, so I'll use pictures to better explain it.
When I use breaking points in debugging I see only numbers:
Thought what I should see is the code itself, like on screenshot below:
What should I change in preferences in order to get the same view?
I tried to use different searching options but no-one raises that question. It's like all have this by default.

Go to settings in Xcode and find: Debug > debug workflow > Always show disassembly (uncheck it).
Note: The Disassembly window shows assembly code corresponding to the instructions created by the compiler.

Related

eclipse turn off compilation on the fly

I cannot find where is the option to turn off showing me compilation errors and warning "on the fly", while coding. I want it to just show me that after debug/run code try. I was looking for in project properties and view properties but cannot find it. Could you help?
While it can be turned off, I'd suggest leaving it on. You want feedback as early in the process as you can get it.

Go to next compiler error across project in IntelliJ

I spend a lot of time going back and forth between SBT and IntelliJ, getting a file, line number, and error from SBT and navigating to it in IntelliJ. Is there a way to automate this at all? Even if it's only via IntelliJ's compiler, I'd love to be able to navigate to the next error project-wide.
To navigate between errors or warnings in IntelliJ you can do one of the following:
Use keyboard shortcuts F2 (Next) and Shift+F2 (Previous) respectively.
On the main menu, choose Navigate | Next / Previous Highlighted Error.
I am using Ctrl+Alt+Up/Down to scroll through the list of errors. This is inside the Compile Messages window. The SBT Console uses the same shortcut, as stated in the SBT wiki.
For this specific question, just use F2 (Next) and Shift+F2 (Previous);
But for any other questions related to shortcuts of IDEA, searching in the Settings-Keymap is better than in Google.
To go to next compilation error in the next file:
Command-0 (go to messages tab where compile errors are)
Down arrow until get to next error
Enter
Esc to get to back to code where this error is
The highly voted answer has not really answered the question. The provided solution of F2 only navigates through the errors in the current file. But picking up from the comments, the suggestion below is not the ultimate answer but is a little bit closer.
Select Problems as shown in the image below
This will list all files that have errors.
Use F2 to navigate through the errors.
At least with this method, it has narrowed down the files with the errors and are just a click away.
2022 UPDATE
This is a whole project, error to error, one-click solution after a 2-second setup. For both setups, optionally disable generate warnings for your compiler.
Windows/Linux Setup
Alt6 or click Project Errors tab of Problems tool window
CtrlNumPad+ or click
to expand all errors
MacOS Setup
Cmd6 or click Project Errors tab of Problems tool window
Cmd+ or click to expand all errors
Now click the first error in the Project Errors tab, fix it, then click the next error. Works regardless of build tool and may work in older versions of intellij than 2022.1.
Edit: Credit #Manuel Romeiro - the answer in his comment worked for a while, but stopped when intellij got confused somehow. Will update my answer if I figure that out.
Thanks #meridsa for providing setup step 1 for Mac. Also to #K. Symbol for syntax for showing keys in an answer (very cool).
For the mac I couldn't find anything that worked until I discovered the following
cmd + 1 -> f2 (on files) -> escape -> f2 (inside file) -> cmd + 1 -> repeat
For going to the next error across the entire project, use Alt+F2 instead of just F2.
On Mac, you can enable Fn regular key functionality in System Preference.
Choose Apple Menu > System Preferences.
Click Keyboard & Mouse.
Click the Keyboard tab.
Select the option Use All F1, F2, Etc. Keys As Standard Function Keys.
Quit System Preferences.

Instruments not showing Responsible Library

I am running instruments to analyze memory leaks in my application,
but it does not show any responsible libraries for any allocations:
Neither it shows any methods/variables in stack trace, it just shows this:
Is there any setting that I am missing? It used to show earlier, it has stopped showing these just recently.
Here are a couple screen shots of how I currently have mine configured. Maybe these will help. First thing I would do is check to make sure that within the current scheme, you have your "Profile" Build Configuration set to Debug like in the first image below.
Also, have you tried right clicking on "Responsible Library" header to remove the checkmark and re-add it like in my last screenshot, to give it a virtual smack? I'll keep looking to see if I can find out anything else more helpful.
Close instruments. Make sure spotlight indexes your build artifacts. You can do this manually by running mdimport from the command line. Reopen instruments.
Obviously, make sure your derived data location, etc. is not in spotlight's blacklist. This is controlled by System Preferences.
Instruments relies on Spotlight for a lot of what it does.

How to add views to Show In menu for particular file types

I use an older plugin called Veloeclipse for editing Velocity templates in Eclipse. There's been no development on this since 2009, which isn't a problem because it's mainly just for syntax highlighting and format validation. The really annoying thing about it, however, is that when I try to do Show In to view the current Velocity template within my Package Explorer or Project Explorer, the only available option is Properties. That's not really useful. I really need to be able to get to the file in one of the regular explorer views.
So I have sort of two questions:
Is there a way to configure this without having to monkey with any code? A configuration file or something? I've grepped through my Eclipse installation and haven't seen anything, but I'm hoping that there's something I'm missing.
So assuming that the answer to my first question is no, how do I go about modifying the plugin code so that it will show more than the Properties view in the Show In menu? Most of what I found on the plugin development wiki comes from the other direction: how to make your view or perspective appear in the Show In menu.
Any help with this would be hugely appreciated!
Try to check the plugin source code. it might do something different than other editors. What I mean is that the show in menu item that you have there is not the usual extension point but a hard coded context menu option.

My breakpoint is not working please give me some suggestions as to why not

While debugging the program my breakpoint is not working, so please give me some advice so that it can work properly.
Maybe you've tried to use the breakpoint on unreachable code? Try setting your breakpoint somewhere before the point you want to reach and try stepping from there to see if the point is actually reached.
Possible Reasons could be.
1. After changes in the code you have not built the libraries properly so the breakpoint is not pointing to the right location in the code.
2. If you are putting a breakpoint in a library then make sure the library is build and is built in Debug mode.
3. Clean full environment and rebuild the project.
Open XCode preferences and in the Debugging tab, un-check "Load symbols lazily", this caught me out when I first started iPhone developement. Then again, it might be for any of the other reasons that people have already mentioned.