{"id":9925,"date":"2016-07-26T11:14:18","date_gmt":"2016-07-26T18:14:18","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/?p=9925"},"modified":"2019-02-18T18:04:45","modified_gmt":"2019-02-18T18:04:45","slug":"july-update-for-the-visual-studio-code-cc-extension","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/july-update-for-the-visual-studio-code-cc-extension\/","title":{"rendered":"July Update for the Visual Studio Code C\/C++ extension"},"content":{"rendered":"<p>At \/\/Build this year\u00a0we launched the <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/cc-extension-for-visual-studio-code\/\">C\/C++ extension for Visual Studio Code<\/a>, with this July update to the extension we would like to thank all of you who have tried out the <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/cc-extension-for-visual-studio-code\/\">C\/C++ extension in Visual Studio Code<\/a> and have already provided rich feedback on your experiences and <a href=\"https:\/\/github.com\/Microsoft\/vscppsamples\/issues\">filed issues and requests <\/a>with us. If you haven\u2019t already provided us feedback, please take this <a href=\"https:\/\/www.research.net\/r\/KB3RFNF\">quick survey <\/a>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:<\/p>\n<ul>\n<li>Process picker to attach the debugger to a running process easily<\/li>\n<li>Support for debugging using the LLDB debugger on Mac OS X<\/li>\n<li>Ability to provide path and name of the browsing database file<\/li>\n<li>Ability to limit symbol processing to included headers only to speed up your code navigation<\/li>\n<\/ul>\n<p>The <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/cc-extension-for-visual-studio-code\/\">original blog post <\/a>has already been updated with these new feature additions. Let&#8217;s learn more about each one of them now!<\/p>\n<h4>Process\u00a0 picker for attaching the debugger to a running process<\/h4>\n<p>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:<\/p>\n<ul>\n<li>Enter the path to the executable in the \u201cprogram\u201d field of the launch.json file.<\/li>\n<li>If you are using an existing launch.json file, you will need to enter &#8220;${command.pickProcess}&#8221; in the \u201cprocessId\u201d field.<\/li>\n<li>If you generate a new\u00a0launch.json file using VS Code, it will set &#8220;processId&#8221; to &#8220;${command.pickProcess}&#8221; by default.\n<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/PROC.png\"><img decoding=\"async\" width=\"500\" height=\"176\" class=\"alignnone wp-image-9926\" alt=\"PROC\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/PROC.png\" \/><\/a><\/li>\n<li>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 &#8220;Enter&#8221;\u00a0<span>\u00a0<\/span>to select it.<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/PROC2.png\">\n<img decoding=\"async\" width=\"720\" height=\"188\" class=\"size-full wp-image-9935 alignnone\" alt=\"PROC2\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/PROC2.png\" \/><\/a><\/li>\n<\/ul>\n<h4>Debug\u00a0using the LLDB debugger on Mac OS X<\/h4>\n<p>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\u00a0LLDB. 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:<\/p>\n<ul>\n<li>Delete the copy in your .vscode folder within the workspace<\/li>\n<li>Click the settings (gear) icon on the toolbar in the Debug view, and choose \u201cC++ (GDB\/LLDB))<\/li>\n<\/ul>\n<p>The generated launch.json file now has platform specific sections to set the \u201cMIMode\u201d 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)<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/proc3.png\"><img decoding=\"async\" width=\"505\" height=\"369\" class=\"alignnone wp-image-9945\" alt=\"proc3\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/proc3.png\" \/><\/a><\/p>\n<h5>Ability to provide path and name for browsing database file<\/h5>\n<p>You can control this\u00a0by using the &#8216;databaseFilename&#8217; property in\u00a0the c_cpp_properties.json file.<\/p>\n<h5>Ability to limit symbol processing to included headers only to speed up your code-navigation experience<\/h5>\n<p>You can control this property by using the \u2018limitSymbolsToIncludedHeaders\u2019 in the c_cpp_properties.json file. The c_cpp_properties.json file can be created by using the \u2018C\/Cpp:Edit Configuration\u2019 task as shown in the figure below:\n<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/pic2.png\"><img decoding=\"async\" width=\"594\" height=\"136\" class=\"alignnone wp-image-9975\" alt=\"pic2\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/pic2.png\" \/><\/a><\/p>\n<h4>Update your extension now!<\/h4>\n<p>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\u00a0 button in the extension window.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/update2.png\"><img decoding=\"async\" width=\"302\" height=\"250\" class=\"alignnone wp-image-9985\" alt=\"update2\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/update2.png\" \/><\/a><\/p>\n<p>Please refer to the <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/cc-extension-for-visual-studio-code\/\">original blog post for links to documentation <\/a>and for more information about the overall experience of Visual Studio Code C\/C++. Please help us by continuing to file issues at our <a href=\"https:\/\/github.com\/Microsoft\/vscppsamples\/issues\"><span style=\"color: #0072c6\">Github page<\/span><\/a> and keep trying out this experience and if you would like to shape the future of this extension please <a href=\"http:\/\/landinghub.visualstudio.com\/c-nonwin\">join our Cross-Platform C++ Insiders group<\/a>, where you can speak with us directly and help make this product the best for your needs.<b><span style=\"font-family: Thread-00000454-Id-000000f5\">\u00a0<\/span><\/b><\/p>\n","protected":false},"excerpt":{"rendered":"<p>At \/\/Build this year\u00a0we 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 [&hellip;]<\/p>\n","protected":false},"author":265,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9925","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus"],"acf":[],"blog_post_summary":"<p>At \/\/Build this year\u00a0we 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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/9925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/265"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=9925"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/9925\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=9925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=9925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=9925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}