July Update for the Visual Studio Code C/C++ extension

Ankit Asthana

At //Build this year we launched the C/C++ extension for Visual Studio Code, with this July update to the extension we would like to thank all of you who have tried out the C/C++ extension in Visual Studio Code and have already provided rich feedback on your experiences and filed issues and requests with us. If you haven’t already provided us feedback, please take this quick survey to help shape this extension for your needs. We are working hard on incorporating your feedback into the product. To continue with our effort to make Visual Studio Code as the editor tool of choice for C++ developers, we are introducing the following features with this update of the C/C++ extension:

  • Process picker to attach the debugger to a running process easily
  • Support for debugging using the LLDB debugger on Mac OS X
  • Ability to provide path and name of the browsing database file
  • Ability to limit symbol processing to included headers only to speed up your code navigation

The original blog post has already been updated with these new feature additions. Let’s learn more about each one of them now!

Process  picker for attaching the debugger to a running process

VS Code now enables you to select a process from a list of running processes rather than needing to manually enter the process id into the launch.json file. To use the process picker:

  • Enter the path to the executable in the “program” field of the launch.json file.
  • If you are using an existing launch.json file, you will need to enter “${command.pickProcess}” in the “processId” field.
  • If you generate a new launch.json file using VS Code, it will set “processId” to “${command.pickProcess}” by default. PROC
  • When you start debugging, focus will go to the VS Code quick launch bar, and a list of running processes will appear. You can filter the list by typing the name of the process you want to attach to, and hit “Enter”  to select it. PROC2

Debug using the LLDB debugger on Mac OS X

The C/C++ extension for VS Code now uses LLDB as the default debugger on Mac OS X. Newly generated launch.json files will automatically use LLDB. If you have an existing launch.json from a previous version of the extension you can follow the steps below in order to use LLDB:

  • Delete the copy in your .vscode folder within the workspace
  • Click the settings (gear) icon on the toolbar in the Debug view, and choose “C++ (GDB/LLDB))

The generated launch.json file now has platform specific sections to set the “MIMode” property that tells VS Code if you will be using GDB or LLDB (currently LLDB is only supported on Mac OS X). The extension pulls down its own copy of LLDB designed to work with VS Code (v3.8.0)


Ability to provide path and name for browsing database file

You can control this by using the ‘databaseFilename’ property in the c_cpp_properties.json file.

Ability to limit symbol processing to included headers only to speed up your code-navigation experience

You can control this property by using the ‘limitSymbolsToIncludedHeaders’ in the c_cpp_properties.json file. The c_cpp_properties.json file can be created by using the ‘C/Cpp:Edit Configuration’ task as shown in the figure below: pic2

Update your extension now!

If you are already using the C/C++ extension, you can update your extension easily by using the ext update dropdown. This will display any available updates for your currently installed extensions. To install the update, simply click the Update  button in the extension window.


Please refer to the original blog post for links to documentation and for more information about the overall experience of Visual Studio Code C/C++. Please help us by continuing to file issues at our Github page and keep trying out this experience and if you would like to shape the future of this extension please join our Cross-Platform C++ Insiders group, where you can speak with us directly and help make this product the best for your needs. 

Posted in C++


Discussion is closed.

Feedback usabilla icon