{"id":17455,"date":"2017-11-09T10:24:31","date_gmt":"2017-11-09T18:24:31","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/?p=17455"},"modified":"2019-02-18T17:48:12","modified_gmt":"2019-02-18T17:48:12","slug":"visual-studio-code-cc-extension-nov-2017-update-multi-root-workspaces-support-is-here","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/visual-studio-code-cc-extension-nov-2017-update-multi-root-workspaces-support-is-here\/","title":{"rendered":"Visual Studio Code C\/C++ extension Nov 2017 update \u2013 Multi-root workspaces support is here!"},"content":{"rendered":"<p>This week has been very exciting for the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpptools\">Visual Studio Code C\/C++ extension<\/a>! It crossed 4 million downloads earlier this week only 18 months after its first release! Today, we are shipping the November 2017 update, which enables the extension to work with multi-root workspaces seamlessly, making VS Code an even more powerful C\/C++ development environment.<\/p>\n<h2>Multi-root workspaces support<\/h2>\n<p><a href=\"https:\/\/code.visualstudio.com\/\">VS Code<\/a> 1.18 and later provides multi-root workspaces support, which allows users to work with multiple project folders in VS Code. This can be very useful when you are working on several related projects at the same time. With the November update, the C\/C++ extension now provides C\/C++ IntelliSense, code browsing, and debugging support for each opened folder independently. Follow the instructions in the <a href=\"https:\/\/code.visualstudio.com\/docs\/editor\/multi-root-workspaces\">VS Code Multi-root Workspaces document<\/a> to add folders to your workspace. The screenshot below shows two folders opened in VS Code, each has its own c_cpp_properies.json file defined:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/Picture1.png\"><img decoding=\"async\" width=\"640\" height=\"685\" class=\"alignnone size-full wp-image-17465\" alt=\"\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/Picture1.png\" \/><\/a><\/p>\n<p>The IntelliSense engine retrieves include paths and defines information from the c_cpp_properties.json file located in the .vscode folder in each opened folder to provide all the IntelliSense and code browsing features, including member list, parameter hints, go to definition, etc. Each folder operates independently from other folders.<\/p>\n<p>For example, in the screenshot below, I have two <em>Calculator.cpp<\/em> files opened in VS Code, one from the \u201cCalculator\u201d folder and the other one from the \u201cFancy Calculator\u201d folder. Each file has a <em>Calculator<\/em> class defined, but with different functions. After typing \u201cc.\u201d, the member list pops up in each file shows the expected member functions that match the definition of the class that lives in the current context (i.e. the folder that the editing document belongs to).<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/Picture2.png\"><img decoding=\"async\" width=\"879\" height=\"431\" class=\"alignnone size-large wp-image-17475\" alt=\"\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/Picture2-1024x502.png\" \/><\/a><\/p>\n<h2>Compiler-based IntelliSense is the new default<\/h2>\n<p>By now you may have noticed an improved out-of-box IntelliSense experience. \ud83d\ude0a The compiler-based IntelliSense engine is now the default engine to provide better and more accurate results to some of the key IntelliSense features, including auto-complete suggestions for class\/struct\/namespace members, quick info tooltips, error squiggles, reference highlighting, and parameter hints. If you are curious, <a href=\"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2017\/06\/27\/visual-studio-code-cc-extension-june-2017-update\/\">this blog post talks about how it works and how to control the behavior<\/a>.<\/p>\n<h2>Tell us what you think<\/h2>\n<p><a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpptools\">Download the C\/C++ extension for Visual Studio Code<\/a>, try it out and let us know what you think. File <a href=\"https:\/\/github.com\/Microsoft\/vscode-cpptools\/issues\">issues and suggestions on GitHub<\/a>. Provide us feedback in this <a href=\"https:\/\/www.surveymonkey.com\/r\/X6ZSTP5\">quick survey<\/a> to help shape this extension for your needs. You can also find us on Twitter (<a href=\"https:\/\/twitter.com\/visualc\">@VisualC<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week has been very exciting for the Visual Studio Code C\/C++ extension! It crossed 4 million downloads earlier this week only 18 months after its first release! Today, we are shipping the November 2017 update, which enables the extension to work with multi-root workspaces seamlessly, making VS Code an even more powerful C\/C++ development [&hellip;]<\/p>\n","protected":false},"author":269,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[270,275],"tags":[274,276],"class_list":["post-17455","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcement","category-visual-studio-code","tag-c-extension","tag-vscode"],"acf":[],"blog_post_summary":"<p>This week has been very exciting for the Visual Studio Code C\/C++ extension! It crossed 4 million downloads earlier this week only 18 months after its first release! Today, we are shipping the November 2017 update, which enables the extension to work with multi-root workspaces seamlessly, making VS Code an even more powerful C\/C++ development [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/17455","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\/269"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=17455"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/17455\/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=17455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=17455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=17455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}