{"id":10186,"date":"2016-08-29T19:54:58","date_gmt":"2016-08-30T02:54:58","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/?p=10186"},"modified":"2019-02-18T18:04:43","modified_gmt":"2019-02-18T18:04:43","slug":"august-update-for-the-visual-studio-code-cc-extension","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/august-update-for-the-visual-studio-code-cc-extension\/","title":{"rendered":"August Update for the Visual Studio Code C\/C++ extension"},"content":{"rendered":"<p>At \/\/Build this year we launched the C\/C++ extension for <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/cc-extension-for-visual-studio-code\/\">Visual Studio Code<\/a>. Keeping with the monthly release cadence and goal to continuously respond to your feedback, this August update introduces the following features:<\/p>\n<p>\u2022 Debug your Windows applications using Visual Studio Code\n\u2022 Improve your code-formatting experience with clang-format\n\u2022 Improvements to auto-complete<\/p>\n<p>If you haven\u2019t already provided us feedback, please take this <a href=\"https:\/\/www.research.net\/r\/ZZMWSXV\">quick survey<\/a> to help shape this extension for your needs. 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\u2019s learn more about each one of them now!<\/p>\n<h3>Debug your Windows applications using Visual Studio Code<\/h3>\n<p>With this August release we are excited to announce that we are adding support\u00a0for debugging Windows desktop applications to the Visual Studio Code C\/C++ extension!<\/p>\n<h4>To debug your Windows application you can follow these steps:<\/h4>\n<p>\u2022 Navigate to the Debug view on the Sidebar in Visual Studio Code\n\u2022 Click the Configure (gear) icon\n\u2022 Select \u2018C++ (Windows)\u2019<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/aug1.png\"><img decoding=\"async\" width=\"716\" height=\"138\" class=\"alignnone wp-image-10195\" alt=\"aug1\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/aug1.png\" \/><\/a><\/p>\n<p>\u2022 You will need to set the value of the \u2018program\u2019 field to point to the binary you are debugging for both configurations\n(launch, attach)\n\u2022 To configure additional locations for the debugger to search for symbol (pdb) files, add a \u2018symbolsearchpath\u2019 property to the\nlaunch.json configurations (separate multiple paths with a semi-colon)<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/aug2.png\"><img decoding=\"async\" width=\"714\" height=\"540\" class=\"alignnone wp-image-10205\" alt=\"aug2\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/aug2.png\" \/><\/a><\/p>\n<h4>This preview of Windows debugging support adds the following capabilities:<\/h4>\n<p>\u2022 Debug x86\/x64 applications\n\u2022 Launch and Attach support desktop applications\n\u2022 Breakpoints (File, Line, conditional and function)\n\u2022 Stepping\n\u2022 Watch and DataTips\n\u2022 Call Stack\n\u2022 Symbol configuration (\u2018symbolsearchpath\u2019)\n\u2022 Multi-threaded debugging<\/p>\n<h4>Known limitations:<\/h4>\n<p>\u2022 Source must be in the same location that it was compiled from\n\u2022 No support for <a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2013\/07\/01\/debugging-asynchronous-code-in-visual-studio-2013-call-stack-enhancements\/\">asynchronous call stacks<\/a><\/p>\n<h3>Improvements to your code-formatting experience with clang-format<\/h3>\n<p>As a part of the June update for this extension we added support to format your C\/C++ code with clang-format. The improvements that this update brings are that clang-format is now installed as a part of this extension. In addition to this the formatting experience now formats your code on the go as you type and we also allow for formatting for only a section of code vs. the entire document when using the \u2018Right Click-&gt; Format Code\u2019 option.<\/p>\n<p>To set and control formatting for clang-format we have introduced a variety of options, which you can override in your workspace, user settings file to tailor the formatting experience for your needs. One change you will see with this release is that we now default to a \u2018fallback-style\u2019 of \u2018Visual Studio\u2019 vs. \u2018LLVM\u2019. This change is primarily made to make sure your formatting settings between Visual Studio and Visual Studio Code are as similar as possible. Currently the Visual Studio style maps to these options for clang-format. The new \u201cVisual Studio\u201d style is not yet officially part of clang-format, but implies the following format options.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/vsstyle.png\"><img decoding=\"async\" width=\"388\" height=\"131\" class=\"alignnone wp-image-10215\" alt=\"vsstyle\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/vsstyle.png\" \/><\/a><\/p>\n<p>Other options include the ability for a user to provide and use a custom version of clang-format, enable auto-formatting when saving the source file and also control popular clang-format tool options (style, fallback-style, sort-includes) as a part of the workspace, user settings. These last set of options to control the clang-format behavior was earlier present as a part of the \u2018c_cpp_properties.json\u2019 file, which we have now cleaned up and all clang-format options are consolidated as a part of the Visual Studio Code default settings.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/augdef.png\"><img decoding=\"async\" width=\"456\" height=\"158\" class=\"alignnone wp-image-10225\" alt=\"augdef\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/augdef.png\" \/><\/a><\/p>\n<h3>Improvements to auto-complete<\/h3>\n<p>Another experimental feature we launched as a part of the June update was the alpha version for the auto-complete feature. The feature provides auto-complete using the symbol database populated to power the code-navigation features such as peek and go-to definition. This feature is an addition to the single-file intellisense experience Visual Studio Code provides by default based upon the text-mate bundle.<\/p>\n<p>Since the release of this feature we have heard strong feedback w.r.t. how today both these intellisense experiences (single file, fuzzy auto-complete) interfere with each other and as a result resulting in a high degree annoyance for our users. With this release we have fixed this experience and now a developer can choose between the two intellisense modes by using the \u2018C_CPP.Autocomplete\u2019 option in the workspace, user settings. The default experience today currently is to provide fuzzy auto-complete only.<\/p>\n<p>Note that this is a preview feature and while this update does not address all of the issues you will likely run into, further improvements are on the horizon!<\/p>\n<h3>Update your extension now!<\/h3>\n<p>If you are already using the C\/C++ extension, you can update your extension easily by using the extensions tab. This will display any available updates for your currently installed extensions. To install the update, simply click the Update button in the extension window.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/augupd.png\"><img decoding=\"async\" width=\"327\" height=\"273\" class=\"alignnone wp-image-10235\" alt=\"augupd\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/augupd.png\" \/><\/a><\/p>\n<p>Please refer to the\u00a0<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\/vscode-cpptools\">Github page<\/a> and keep trying out this experience and if you would like to shape the future of this extension please join our <a href=\"http:\/\/landinghub.visualstudio.com\/c-nonwin\">Cross-Platform C++ Insiders group<\/a>, where you can speak with us directly and help make this product the best for your needs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At \/\/Build this year we launched the C\/C++ extension for Visual Studio Code. Keeping with the monthly release cadence and goal to continuously respond to your feedback, this August update introduces the following features: \u2022 Debug your Windows applications using Visual Studio Code \u2022 Improve your code-formatting experience with clang-format \u2022 Improvements to auto-complete 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-10186","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus"],"acf":[],"blog_post_summary":"<p>At \/\/Build this year we launched the C\/C++ extension for Visual Studio Code. Keeping with the monthly release cadence and goal to continuously respond to your feedback, this August update introduces the following features: \u2022 Debug your Windows applications using Visual Studio Code \u2022 Improve your code-formatting experience with clang-format \u2022 Improvements to auto-complete If [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/10186","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=10186"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/10186\/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=10186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=10186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=10186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}