The Xcode Swift debugging experience is one of the poorest I've ever had. I use JetBrains and Visual Studio daily alongside Xcode and it's shameful that Apple does not produce a better quality IDE in light of these others that have been capable of such an efficient developer experience as that have already for many, many years.
Does anyone know why Xcode editor does not hover-inspect instance fields but can hover over local variables? I have to then expand self and hunt for the variable in the list. I simply don't understand why this isn't possible. It's infuritating and wastes developer time trying to figure out the contents of an instance variable. There's a great deal more I could write but I won't bother.
I suppose it disappoints me that it seems like it will never get any better. Apple devotes time to AI code completion but no the efficiency and capability of the debugger?
This seems like a very good enhancement request to file via Feedback Assistant. For what itâs worth, I never use the locals window either; I just type p instanceVar in the debugger window. That might be a habit born out of switching to full-time Mac development almost 20 years ago, back when Xcode and its gdb integration were much more primitive.
Please do file feedback reports and share the numbers here. Itâs always helpful to hear what people are missing most when they switch from Visual Studio.
Please donât engage in the fallacy that any feature you donât use came at the expense of a feature or design change you would have liked to see.
You're right. I guess I would have thought that with millions of developers and thousands of Apple's own developers (and the ones who build Xcode itself) who have to deal with these inefficiencies every single day for years on end in light of the industry alternatives, that tiny developers like me with nothing but a Feedback Assistant wouldn't have to complain and rant so often for years before anything is done. But maybe I'm just delusional! Haha.
For what's it's worth, I'll try to submit my feedback and hope for the best.
Iâd would attribute the âinefficiencyâ to your muscle memory reaching for a Visual Studio feature in a different IDE. Xcode has learned from other editing environments in the pastâit gained vim mode a few years ago, which spares me the âinefficiencyâ of using the wrong shortcuts when I switch between editing code and commit messages. In this case, since Xcode already supports the feature you want on locals, it certainly isnât helping retrain your muscle memory.
Different ways of doing things is fine. I have to context switch between Visual Studio, JetBrains PhpStorm and Xcode almost every day. Xcode simply fails to live up to the standards of these alternate IDEs in major ways. The debugger makes life slow and laborious. It requires much more manual interaction just to inspect variable contents. Hovering over local variables works, but why doesnât instance variables in class methods while youâre debugging them? This just doesnât make any sense. Why do I have to go searching in the watch list, expanding and expanding self.variable.somethingElse whenever I want to just look at a variable in the code editor that happens to be an instance field? This isnât âdoing things differentâ, this is âstrangely missing?â.
I guess my point is that when you have to do this day in day out for years on end, debugging, refactoring and code editing efficiencies and capabilities such as what VS and JB give you make a huge difference over time.
Iâm not the only person in the world who finds Xcode to be below the standard that 2024 sets for IDEs, especially from a company as enormous as Apple.
Iâll go and rant politely to the Feedback Assistant.
Thanks for filing, and please do share the feedback numbers here. I interact with many people who have been daily drivers of Visual Studio for many years, and Iâm interested in learning where the pain points are when switching to Xcode. Often times, they've spent years accessing equivalent functionality through a different UI path.
I submitted one requesting the ability to disable animations that waste the user's time by blocking any input. Debug variable inspector and Rename Refactor animation being unnecessary. I use these functions significantly and waiting for animations is annoying as heck. FB15245818
P.S. I realised you can disable them in Accessibility but I don't want to do this for the entire system, just Xcode.
Thanks for encouraging me to submit ksluder. I suppose I gave up believing that my feedback would have any effect or ever be seen by anyone (maybe it will, maybe it won't!). I guess my main complaint is really with the debugger. The rest of Xcode I can generally work with fine.
leads to an unhelpful debugger conversation like that:
(lldb) p update
error: type for self is invalid
error: Couldn't realize Swift AST type of self. Hint: using `v` to directly inspect variables and fields may still work.
(lldb) v update
(CoreLocation.CLLocationUpdate.Updates.Element) update = <Failed to dereference pointer from 0x18faed58 for DW_OP_deref: failed to send packet: 'x18faec00,200'
Ok, in this particular case I'm debugging watchOS (which probably is the most fragile platform to develop I've ever encountered in my 40 years of professional experience), so YMMV.