Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

phl92

macrumors 6502
Original poster
Oct 28, 2020
301
47
Lately I was testing out quite a lot of editors and IDE's.
I never really tried Apple's Xcode and I also heard some bad things about it, but I have to admit I like it from the beginning. So I am playing around with it and find most things quite intuitive. It is easy to get along similar as CLion did it for me, but it has a huge advantage: Xcode run natively and is optimized for Mac and RAM usage is a fourth of the Jetbrain software.

I just have one big issue: my Editor History is not showing up. I searched and also checked Google but I cannot get it work. On my right side of the Editor in the "Show the History Inspector" is always written "Not applicable". I tried to close and restart a file, restart program etc.

Do I need to activate something?
I do not want to have Github active all the time and get the history from there, I just want to code offline for my own testings, so it needs to be working without Git as well?!
 

Attachments

  • Screenshot 2022-12-27 at 19.52.00.png
    Screenshot 2022-12-27 at 19.52.00.png
    154.6 KB · Views: 228
I never really tried Apple's Xcode and I also heard some bad things about it, but I have to admit I like it from the beginning. So I am playing around with it and find most things quite intuitive. It is easy to get along similar as CLion did it for me, but it has a huge advantage: Xcode run natively and is optimized for Mac and RAM usage is a fourth of the Jetbrain software.
Xcode is a good IDE when developing applications for Apple platforms. It is excellent for Swift and Objective C and has amazing tooling for Apple frameworks. It's even got decent support for C/C++ though again mostly targeting Mac deployment. If your goal is to make a Qt app, CLion will get you up and running faster and have better tooling. And if you're working with basically any other language or environment, Visual Studio Code with the right extension will get you there. And VSCode is significantly more lightweight than Xcode. Booting *a lot* faster, and the extension support means you can theme it to look a lot like Xcode's editor and have great support for any language and environment under the sun, including awesome additions like Docker dev containers and ssh-based remote editing.
For simple tiny edits one can always just use nano.

There doesn't have to be one tool to rule them all.
I do not want to have Github active all the time and get the history from there, I just want to code offline for my own testings, so it needs to be working without Git as well?!
I think you might have a misunderstanding of the primary purpose of Git and its relationship to GitHub.
I highly recommend using Git for any project expected to live more than like 2 hours. It is *not* just for collaboration or online usage. Git's primary purpose is version control. That applies just as much to pure local development that will always stay on just one machine and just be made by you. GitHub hosts git repositories, but Git is decentralised. A git repository living only on your machine is effectively no different to a git repository living on GitHub, GitLab or anywhere else. GitHub is owned by Microsoft. Git itself is a project started by Linus Torvalds, developer of Linux, and is Free as in Freedom. Xcode can set up your projects with Git at project creation time and has shortcuts for committing. When working locally you don't need to think about push pull. Just commits. Then you can checkout to go back in your history or use bisect to figure out when a bug was introduced. Or use the Xcode GUI for all of this. Online and use of GitHub is **not** required to get a good experience with Git. Even if you want it to be online you can also host your git projects yourself.
 
  • Like
Reactions: phl92
Your Xcode project must be under version control for the history inspector to show anything. The history inspector shows the git commits you have made to the file. If your project isn't under version control, there are no commits to show.

In Xcode choose Source Control > New Git Repository to place your project under version control.
 
  • Like
Reactions: phl92
Thanks both to you!
This helped a lot, and yes Casper you were right, I did not understand the difference of Git / Github.

One more question, since I indeed only use MacOS on my laptop. You say Visual Studio Code is capable of pretty much the same as full IDE's. What I am missing in VS Code is the live warnings/helpings of the compiler. I do find them quite cool in CLion where I have all the time live hints or error or warnings and can analyze them in depth. In Xcode it's even in the line of code showing some errors/warnings/hints... Is there a plugin for this in VS Code, for C?
 
Thanks both to you!
This helped a lot, and yes Casper you were right, I did not understand the difference of Git / Github.

One more question, since I indeed only use MacOS on my laptop. You say Visual Studio Code is capable of pretty much the same as full IDE's. What I am missing in VS Code is the live warnings/helpings of the compiler. I do find them quite cool in CLion where I have all the time live hints or error or warnings and can analyze them in depth. In Xcode it's even in the line of code showing some errors/warnings/hints... Is there a plugin for this in VS Code, for C?
Of course. The C/C++ language pack extension Microsoft ships can do that. May require you to inform it of your include paths and to have a Make/GNUMake/CMake file
1672178766963.png
 
  • Like
Reactions: phl92
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.