back to article As if you needed another reason not to use Visual Studio, C++ extension for Visual Studio Code is live

Microsoft has shunted the C++ extension for Visual Studio Code to general availability. The Reg took it for the compulsory "Hello World!" spin in Windows 10 to see how it worked and found it quite delightful (if C++ is your thing). IntelliSense and code formatting is present and correct, as is semantic colouring to show when a …

  1. cantankerous swineherd

    no debugger though?

    1. Anonymous Coward
      Anonymous Coward

      No need. C++ is so complex now, no-one can get it to actually compile anymore.

    2. Anonymous Coward
      Anonymous Coward

      No, you can get gdb up on it. As far as what is new in debugging with VS since VS6, maybe not, but if you've used VS6 all that is there.

      The _FATAL_ problem isn't Code itself, it's Electron. After you open enough files the entire IDE drops into an unresponsive life wasting mess. In some cases it's just not a simple restart, sometimes plugins (platform.io) seem to vanish and in the most unfortunate cases so does your settings for them.

      Microsoft thought Eclipse was too cross platform and fast, so they decided to eclipse... Eclipse. It's conceptually a really good IDE, but everything is absolutely, positively, undeniably SLOW. Because of Electron, it can literally never be, a serious IDE.

      1. Robert Grant

        Then I'll stick with a silly IDE.

      2. Outer mongolian custard monster from outer space (honest)

        I've got into using it for ruby of late because its fairly cross platform (albeit electron which I would prefer it to be native too) and compared to Rubymine (corporate choice) things feel really responsive. Now if only the debugger could step into child threads properly like Rubymine can when using remote ruby-debug-ide.

        To put a finger in the air metric, there's 5000 files in the current project I have open in it and it seems to cope quite nicely. I use it on osx and linux.

        Also I quite like to hook remote things in python using it, and xcode for php etc is nice and works ok. Ive never seen the platform.io issues etc yet, maybe theyre lying in wait for me later on.

        For c++ usual habits are to use vim + gdb/cmd line stuff mostly with a dash of ghidra but I work so much in web stuff now I rarely do any now...

  2. Rich 2 Silver badge

    C++

    But visual studio supported C++ since day one - ie about 20 (30??) years ago - I still have the installation CDs from the 90s! Did they remove it so that they can add it back in again?

    1. Mark #255

      Re: C++

      I think it's been a bumpy path...

      I used VC++6 and it had Intellisense, which was awesome.

      When I later tried (the free editions of) VS 2008 and 2010, C++ support was barely visible (compared to C#): you could type, create projects (e.g. add new classes [header and body files per class]), and compile, but the clever stuff didn't work.

      I always felt that if I wanted to stray outside the .NET bubble, I'd need to pay up for a real version.

      Evidently, that's what's changed.

      1. arctic_haze

        Re: C++

        They can take VC++ 6 only from my cold dead hands.

    2. Anonymous Coward
      Anonymous Coward

      Re: C++

      No, it's always been there. In fact, Visual Studio (not Code) err... might be the best IDE for C++ (sorry :-/). However, I will admit that if you're not experienced in one way or another as a system programmer, you might not know that many see MS VS as basically the C++ compiler for WinAPI... and that's it (No c#, no VB, no wtf ever). So, yes it undoubtedly has and has had C++ support forever.

      Truthfully, getting C++ working in any IDE I've used is no different than getting C working. And if you can't get C working? People shamefully say that this or that IDE didn't have this or that for C or C++, when the reality is that if it's written anywhere in C or C++, they just have no excuse (for tools at least... for tools).

      1. Dan 55 Silver badge

        Re: C++

        Well, there are IDEs which don't like Makefiles and only work with CMake.

    3. Sin2x

      Re: C++

      You are mixing up the paid Visual Studio and its free little brother Visual Studio Code, which is a completely different piece of software despite a similar name.This story is about the latter.

      1. Kobblestown

        Re: C++

        There's also Visual Studio Community which is a free stripped down version of the regular Visual Studio. It has everything most people need (much more actually - https://visualstudio.microsoft.com/vs/compare/). I'd see no reason to use VS Code for C++

    4. bombastic bob Silver badge
      Devil

      Re: C++

      I still use MFC for Windows stuff. It's gotten "bloatier" though. it also take some effort to REMOVE! ALL! REFERENCES! TO! CLR! AND! OTHER! SUCH! BLOAT!

      And I still use DevStudio 2010, the LAST one that was NOT all 2D FLATTY FLATSO McFLATFACE, which was ALSO oriented towards Windows 7, and NOT "Ape" nor Win-10-nic.

      What I'd like to see is wxWidgets support, INCLUDING dialog editors, toolbar editors, menu editors, and other such things. THAT is TRUE cross-platform, very MFC-like (not 1:1, takes some time to port an MFC application to wxWidgets, but it CAN be done) and DEFINITELY suited for serious cross-platform application development.

      I've run wxWidgets/GTK applications on FreeBSD and Linux. Should run the same on windows and Mac. In fact I put a nice "sort demo" written for wx out there on github if anyone wants to have a look. it was originally an MFC application, back in the 90's. It's since been improved.

      /me points out, if you're going to haul around some monolithic library of excess, might as well static-link it and use something that's truly cross-platform. Sure you'll have to build a version for each OS, but with static link you get minimal dependencies and fewer support issues caused by anything resembling DLL HELL...

      In any case, it would be _WISE_ to have wizards and editing tools for wxWidgets in VS Code. THAT might make it worth using, In My Bombastic Opinion.

  3. Someone Else Silver badge

    I dunno

    QtCreator and/or CLion FTW. Either are more mature, more flexible, and are not from Micros~1 (3 great reasons to choose them over VSCode).

    1. _LC_
      Thumb Up

      Re: I dunno

      KDevelop keeps looking better by the day as well. On the plus side, they offer AppImage downloads (single file that includes all dependencies and runs everywhere - great for testing it).

  4. Dinsdale247

    Eclipse needs to go away now

    I got really tired of Visual Studio and Eclipse. I HATE having to drill into a dialog box every time I want to change my build settings, include paths etc. I very much favor IDEs that use text files for build/project configuration. Using eclipse on our last project was so bad I was actually getting wrist and arm pain from click click clicking on dialog boxes. You know things are bad when CMake becomes the less painful option!

    KDevelop has become an excellent IDE, though there are some odd key map duplicates when you first install it. Every keymap can be re-assigned which is both a blessing and a curse. Regardless, it's smoking fast, has lots of tools and is cross platform. I use it with CMake or xmake

    CLion is now my hands down favourite IDE. Though the key mappings aren't as flexible as KDevelop - and you are more or less glued to CMake - I have found it to be fast, full features and incredibly robust. The only outstanding issue I have so far is getting OpenOCD to work with it for debugging embedded systems.

    CLion is so good in fact, I can't wait to try Ryder so I can ditch Visual Studio 2019 for my C# development.

    1. RichardBarrell

      Re: Eclipse needs to go away now

      > I very much favor IDEs that use text files for build/project configuration

      FWIW VS Code satisfies this too. All the VSCode-specific per-project settings(*) are JSON-with-comments files in a ".vscode" directory. Building from the IDE generally invokes the same CLI build tool as you'd be using if you weren't using an IDE at all & will be using the same build config files as you'd have on CI.

      (* this is mostly stuff like, say, launch.json tells VSC which binary to invoke when you press F5 and whether or not to pop open the mini-terminal when you do so.)

      > I HATE having to drill into a dialog box every time I want to change my build settings, include paths etc.

      On that note, have you ever tried using XCode? Now there's a huge bundle of endless suffering.

    2. _LC_

      Re: Eclipse needs to go away now

      I used to think this way as well. Then I tried CLion on more complex code and chose to abandon it. It becomes PAINFULLY slow. Almost all the “convenience functions” (like refactoring) do NOT work in more complex scenarios. The only thing that works reliably, is what is being provided by the CLANG back-end and thus is to be found in QtCreator, KDevelop and others as well.

  5. Anonymous Coward
    Anonymous Coward

    Tried it

    I haven't written code for a while so wanted to see how quickly it would be to get started again so on the basis of this article installed Visual Studio Code. The C++ is definitely there in the extensions and it's supports the file format .cpp etc..

    Wrote a quick hello world app and couldn't see Compile. Also the #include <iostream> was underlined.

    So it turns out I also need to install .NET SDK and a C++ compiler. I went to the Microsoft site and it basically wants me to install the full Visual Studio.

    Why can't it be simple to get started and going?

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Other stories you might like