C++ Programming with Visual Studio Code

In this episode, Robert is joined by Rong Lu, who shows the C/C++ support in Visual Studio Code provided by the Microsoft C/C++ extension. The focus of the extension is code editing, navigation, and debugging support. Rong shows IntelliSense, formatting and navigating code, Peek and Go to definition and then building and debugging.

– C++ Support in Visual Studio Code: https://code.visualstudio.com/docs/languages/cpp
– Microsoft C++ Extension for Visual Studio Code: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools

33 thoughts on “C++ Programming with Visual Studio Code

  1. I simply love VSCode, even for C++….But PLEASE, all the JSON files probably takes more time than actually making the folder. I use VSCode for everything else except for C++ and it pains me that that Code Blocks is simple and easier and faster to write, build and run a cpp program than something as VSCode

  2. Reporting from 2020 – it is still too bad for C++ development.
    1. A lot of red things around includes, even iostream, memory, etc.., you need to hardcode paths to include directories, which looks like that "C:Program Files (x86)Microsoft Visual Studio2019CommunityVCToolsMSVC14.25.28610include", yes, each minor-patch update changes version and you need to keep it in sync in project settings (and other members need to have only that specific version to keep it working without changing shared settings) (VS works just automagically)
    2. Lack of parsing/tokenization caching. Each cmake reconfiguration, even simple switching between files causes FOUT and you're waiting for about several seconds it highlight all methods, strings, variables, etc… (VS works much better)
    3. Syntax artifacts from time to time. When you switch files – you can randomly get broken intellisense and syntax highlighting. You must "Reload Window" and just hope it will reparse everything again (VS doesn't breaks too often. Never as I remember I worked with it)
    4. Because of point 1 – you cannot often rely on Intellisense. It is too easy to break it. Fragile javascript code underneath is the reason IMO

  3. Please, add some code generation (e.q. create a c++ class with .cpp and .h files or create a method definition in .cpp by a declaration in .h). Name refactor is another cool thing. Due to these limitations I still prefer vanilla Visual Studio over VSC.

  4. this is the first vid on youtube i found from msvs when i searched vscode.
    i came here to spam this message: vscode is top-tier aesthetics.
    this is the first ms open-source ive used (at least knowingly).
    way to make a statement (and apology).

  5. For someone who is trying to learn C++ as their first language, this software is awful. This is software has a steeper learning curve than the language itself. I really wanted to like VSCd, but you developers at MS-VS cannot seem to comprehend that making convoluted software is very frustrating to noobs like myself and everyone else. And then you market the "light-weight" aspect as beginner friendly. It's not beginner friendly. In fact VS Community is easier to grasp for a beginner, and it's quite complex too. The whole "light-weight" thing just means more frustration by having to install extensions and then having to configure some settings. Furthermore, in order to compile or debug I need some JSON file. What the heck is JSON? I'm learning and writing C++. All I'm trying to do is write 'Hello, World!'. That should take me 5 minutes at most, not hours configuring software. It should be as simple as writing the code and pressing ONE button to run my code.

  6. Bad things in vscode, everytime you wanna start a new project, you have to write a lot of json codes, configure it to find include files and many other things. We need an extension who avoid us to write theses codes

  7. Should I create new project everytime to run new .CPP files in vs code..
    My problem is ,When I am writing another program after "Hello World " program ,i Am getting multiple definition of main error…Please help

Leave a Reply

Your email address will not be published. Required fields are marked *