Visual Studio Code

Hello everyone,

I would like to start c++ coding with linux now. I enjoy both operating systems windows and linux, but I really want to start using seeing that I went through the trouble of installing it on my laptop. Anyways, I install Visual Studio Code on linux, my question is when you start it, what next? I did the the install c++, but you know how regular IDEs they have a template to start from, does visual studio code have the same template? Thanks in advance.
I've been a developer a long while, and wrote for UNIX and Linux for decades.

I must admit the link @Furry Guy is new to me, and I may try it myself.

I'm a Visual Studio fan, but not so much of Visual Studio Code. I've been told it can be equipped with plugins to function as a full IDE, and I've tried it, but I find the instructions vague and could not get the results I wanted.

Visual Studio has a pluging for VisualGDB which can do all that I want, but only if I'm willing to write and manage the project in Windows, connecting to Linux for debugging (which would be fine), but the product is nearly as expensive as buying an IDE.

I tried Eclipse. I have used Eclipse on Linux before, way, way, back, largely for Android development before Android Studio existed. It worked, though I had to use ARM's debugger (which was superior to GDB).

About a month ago I tried to launch a Linux development project and tried a bunch of the "best IDE's for Linux development" from a link.

Eclipse was just too flaky. I finally got it to run, had to reboot for something after a few hours, after which Eclipse wouldn't launch (gave an error).

I had rejected KDevelop. It wasn't on most of the "best IDE" lists for some reason.

It works. It isn't perfect, but it's fairly good. I can't quite figure out a straight forward way to build applications with CLang/LLVM 8, but I did easily upgrade to GCC 9.1, and so far that seems to be a fairly good combination.

I've also tried QtCreator just now, and while it is "wired" for Qt development, it does work on straight console applications applicable to study apps, and worked "out of the box" with all of the compilers I have installed. That looks quite good.
Last edited on
unfortunately, I haven't figured out the visual studio code for linux yet, so I might try to find an alternative. I must confess, I haven't figured out visual studio on windows yet either lol.

The simplest template to get started writing C++ on a mainstream Linux is:
1
2
3
4
int main()
{

}


written in any text editor, saved as someFile.cpp , and then compiled/linked on the command line with

g++ someFile.cpp

If you're moving over to Linux, it would be a shame not to experience this beautifully simple option at least once.
I've tried several IDEs and coding tools like Visual Studio Code. None compared to Visual Studio. Like Niccolo, I tried getting plugins and such for Visual Studio Code, but it was more hassle than it was worth.


If you're moving over to Linux, it would be a shame not to experience this beautifully simple option at least once.

This is usually what students hated most when coding on Linux! As they move on they'll get use to it and like it, but I always found Windows coding to be easier and more simplistic, especially with Visual Studio.
zapshe wrote:
This is usually what students hated most when coding on Linux! As they move on they'll get use to it and like it, but I always found Windows coding to be easier and more simplistic, especially with Visual Studio.


I guess you meant to say that coding in an IDE is easier than from a shell. Developing in Linux != doing everything in the shell. If one asked a beginner to do the exact same thing in a PowerShell, they wouldn't like that either.

An entirely different question is which IDE one thinks is best suited to them.
I guess you meant to say that coding in an IDE is easier than from a shell.

Yep.


Developing in Linux != doing everything in the shell.

Of course, you can get an IDE. But I assume some people prefer the shell and it's why they code with Linux to begin with.

At my university, you have to use the shell. I code on Visual Studio, then once on the shell to make sure it works before I turn things in. It's highly annoying at times.
IMHO the best way to develop on linux is not to. Develop on windows with a full version of VS and deploy it to linux to build /run.
I've used some of the Linux text editors (most generic but also Eclipse), couldn't like them. Had a friend next to me using some black-screen green-text text editor, it was atrocious. I couldn't even help him figure out what was wrong with his code because you could only navigate it with the arrow keys. University sure knows how to give students a horrid experience.
@zapshe,

That took me back to my early years, late 70's and early 80's, when the monitors themselves were monochrome, either amber or green text on black background, and no mouse in sight.
@Niccolo

I also see you post about certain aspects of coding that were crucial back then due to small memory and minimal compiler optimizations. I feel like that gives you an amazing insight into programming, but I'm also glad that I don't have to worry about these things.
I wish I could recommend GNOME Builder ( https://wiki.gnome.org/Apps/Builder ), but it seems to be having some problems with determining what version of C++ its parser is supposed to use, making the use of C++17 awkward at best. New projects also don't seem to have a way of specifying the version of C++ that should be used.

Otherwise it has a lot of things going for it as a beginner's IDE:
* A simplified interface
* First class support for meson+ninja
* Good autocompletion via libclang
* Quick access to documentation

-Albatross
I also see you post about certain aspects of coding that were crucial back then due to small memory and minimal compiler optimizations. I feel like that gives you an amazing insight into programming, but I'm also glad that I don't have to worry about these things.


Ah, but you do, at some point. The problem is scaled up. What I mean is, you need a bigger problem than we did in 1995 before you hit a limitation, but you do still have a limitation (see the post on the fellow pre-allocating 400GB of ram for his container). Large project written from a bunch of small memory hogging and inefficient pieces of code will be sluggish, and difficult to cure. If you worry about the memory profile and performance just a little bit on the small stuff, when you assemble it, the big program will have that inherited. Ever opened a big commercial program and had it take more than 1/2 a second to load? Why? Your computer can do teraflops of computations and suck hundreds of MB off the disk per second and so on. What is going on in there? Fire up something like eclipse (back to the topic on hand) and its like using a 386 all over again. Little pieces of junk put together in to a big piece of junk, is why. We can be glad for our modern tools and having to worry about this stuff less, absolutely. But if you ignore it entirely, the final product may not be as slick as you might like.

Last edited on
Topic archived. No new replies allowed.