Gourav Goyal
V-Contact VSC Installation and service instructions 7.2/12 kV - 400 A For your safety! Introduction 2 II. Programme for environmental protection 2 III. Application of the standards for X-ray emission 3 IV. Safety information 3 V. Qualified personnel 3 VI.Interventions in the field 3 1. Description 4 1.1. “MAC” magnetic drive 4 1.2. The C/C extension adds language support for C/C to Visual Studio Code, including features such as IntelliSense and debugging.
By the end of this short guide, you’d be able to run, debug, and get IntelliSense for C/C++ files in VSCode. Though, this guide is focused on the Windows platform but can be extended to Mac and Linux with some minor changes.
I extensively used C & C++ in my competitive programmingyears and wanted better support for debugging & IntelliSense. The only options availablewere Dev-C++ (outdated) and the original 'Mammoth'Visual Studio. Lately, I found VSCode and fell in love with it (first love was Atom).I tweaked it around and set it up as a complete IDE For small C, C++ projects especiallygeared towards competitive programming.
Create a sample C/C++ project
- Open/Create an empty folder in VSCode.
- Create a
new.cpp
file inside it like below:
new.cpp
- Install recommended C/C++ extension in VSCode and reload.
Install C/C++ Compiler
C/C++ extension does not include a C++ compiler. So, you will need to install one or use which is already installed on your computer.
Windows: Download MinGW64.zip (latest release) and extract it to the C Drive.
Mac:XCode
Linux:GCC
Also, Make sure to add C++ compiler PATH to environment variable of your platform. For Windows MinGW64 add:
C:MinGW64bin
Run and Debug C/C++ Code
You’ll notice that there is also a
.vscode
folder in your sample project. To configure debug configuration
, 2 files are required launch.json
and tasks.json
inside .vscode
folder.VSCode can create and auto-configure these files if we try to debug for the first time. To do that, open C++ file in VSCode and either hit F5 or go to Debug -> Start Debugging and select
C++ (GDB/LLDB)
then select g++.exe build and debug active file
.This should create 2 files
launch.json
and tasks.json
in .vscode
folder which should look like below (update the MinGW64 path if not correct)Notice that I’ve added one more optional configuration
g++ build & run active file
in launch.json
and g++ build & run
in tasks.json
file for purpose of also Running C/C++ code without debugging. Now you may choose which configuration to pick when you start debugging. You may remove the configuration whichever you won’t need.launch.json
tasks.json
tasks.json
externalConsole
in launch.json
can be set to true to see code output in cmd instead.Restart VSCode to take effects of newly added compiler paths.
Open any C/C++ file, set some breakpoints (or not), and hit the Big Green Play Button.
(Shortcut to debug: F5 )
Tip: To hide
*.exe
files in the side explorer of VSCode, open settings and paste the below config:Thanks for reading. Would love to hear your thoughts about it. Connect with me onTwitter andLinkedIn.
Notice
Some of the downloads that are mentioned in this article are currently available on My.VisualStudio.com. Make sure to log in by using a Visual Studio Subscription account so that you can access the download links.
If you are asked for credentials, use your existing Visual Studio subscription account or create a free account by selecting 'Create a new Microsoft account.'
Summary
This article lists the download links for the latest versions of Microsoft Visual C++.
Visual Studio 2015, 2017 and 2019
Download the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019. The following updates are the latest supported Visual C++ redistributable packages for Visual Studio 2015, 2017 and 2019. Included is a baseline version of the Universal C Runtime see MSDN for details.
- x86: vc_redist.x86.exe
- x64: vc_redist.x64.exe
- ARM64: vc_redist.arm64.exe
Note Visual C++ 2015, 2017 and 2019 all share the same redistributable files.
For example, installing the Visual C++ 2019 redistributable will affect programs built with Visual C++ 2015 and 2017 also. However, installing the Visual C++ 2015 redistributable will not replace the newer versions of the files installed by the Visual C++ 2017 and 2019 redistributables.
This is different from all previous Visual C++ versions, as they each had their own distinct runtime files, not shared with other versions.
Visual Studio 2013 (VC++ 12.0)
- Download the Microsoft Visual C++ Redistributable Packages for Visual Studio 2013. This is the latest supported Visual C++ redistributable package for Visual Studio 2013.
- Download Multibyte MFC Library for Visual Studio 2013. This add-on for Visual Studio 2013 contains the multibyte character set (MBCS) version of the Microsoft Foundation Class (MFC) Library.
- Download Visual C++ 2013 Runtime for Sideloaded Windows 8.1 apps.
For more information, see C++ Runtime for Sideloaded Windows 8.1 apps on the VC++ Team Blog.
Visual Studio 2012 (VC++ 11.0)
C++ Build Tools Vscode
Download the Microsoft Visual C++ Redistributable Packages for Visual Studio 2012 Update 4. This is the latest supported Visual C++ redistributable package for Visual Studio 2012.
Visual Studio 2010 (VC++ 10.0) SP1
- Download the Visual Studio 2010 Service Pack 1 (Installer). This is the latest supported Visual C++ service pack for Visual Studio 2010.Note: This web installer requires an internet connection. This installer downloads and installs Visual Studio 2010 Service Pack 1. It works for all editions of Visual Studio 2010 (Express, Professional, Premium, Ultimate, and Test Professional).
- Download the Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC Security Update. This is the latest supported Visual C++ redistributable package update for Visual Studio 2010. Using markdown in jupyter notebook.
Vsc C++ Mac
Visual Studio 2008 (VC++ 9.0) SP1
- Visual Studio 2008 reached end of support on April 10, 2018. To aid the discovery of the latest downloads, the links are retained currently, but may be removed in the future.
- Download the Visual Studio 2008 Service Pack 1 (Installer). This is the latest Visual C++ service pack for Visual Studio 2008. This service pack improved responsiveness, stability, and performance.
Note This download installs Visual Studio 2008 Service Pack 1 and Microsoft .NET Framework 3.5 SP1. - Download the Microsoft Visual C++ 2008 Service Pack 1 Redistributable Package MFC Security Update. This is the latest Visual C++ redistributable package update for Visual Studio 2008.
![Vscode Vscode](https://www.freesion.com/images/54/6a8ca56189762581721d75e112c02616.png)
Visual C++ Redistributable Packages
Visual C++ Redistributable Packages install runtime components of Visual C++ Libraries on a computer that does not have Visual C++ installed. The libraries are required to run applications that are developed by using the corresponding version of Visual C++.
For Visual Studio 2008
Vscode Build C++ Project
These packages install runtime components of C Runtime (CRT), Standard C++, ATL, MFC, OpenMP and MSDIA libraries. They are installed into the native assembly cache, also known as the WinSxS folder. They are installed on versions of Windows operating systems that support side-by-side assemblies, for libraries that support side-by-side deployment models (CRT, STL, ATL, MFC, OpenMP).
Microsoft Foundation Class Library Security Update
A security issue was identified. This issue causes a Microsoft Foundation Class Library application vulnerability in your Windows-based system that uses the Visual C++ Redist. The Microsoft Foundation Class Library Security Update packages in this article have the most current redistributable files for Visual Studio.