Our Blogs

Visual Studio Code gets better with C/C++ Extension

May 27, 2016
Visual Studio Code gets better with C/C++ Extension
Microsoft has released updates for the C/C++ extension in Visual Studio code. As part of the latest update, Microsoft has incorporated several advanced features like code formatting with clang-format, fuzzy auto-complete, Cygwin/MinGW debugging including console application debugging with GDB on the Mac.

It is now possible to format C/C++ code with clang-format from within Visual Studio Code. If the file is not found, the default fallback-style specified in the c_cpp_properties.json file is used. You will be able to control clang-format behavior via the settings file 'c_cpp_properties.json' file. It is also possible to load and edit the file by executing the relevant command.
The latest update also introduces a preview version of a fuzzy Auto-Complete for C/C++ code. Even though it is based on an enhanced tag-parser approach, it will still provide you more than what single-file intellisense provides you today. Moreover, this fuzzy intellisense approach will work with C code as well.

The May update also provides an ability for developers to debug their C/C++ Cygwin/MinGW applications using Visual Studio Code. To work with cygwin or MinGW, the debugger path must be set manually in the launch configuration file launch.json. With the help of the latest update, you will be able to debug console applications on the Mac using GDB. 

You can easily update by simpy selecting the ext update from within C/C++ extension. You will have to select the Update Extension button in the lower right for the outdated extension. As soon as the installation is completed, you will be required to restart VS Code.