{"id":15925,"date":"2017-05-19T13:37:20","date_gmt":"2017-05-19T20:37:20","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/?p=15925"},"modified":"2019-02-18T17:48:28","modified_gmt":"2019-02-18T17:48:28","slug":"visual-studio-code-cc-extension-may-2017-update","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/visual-studio-code-cc-extension-may-2017-update\/","title":{"rendered":"Visual Studio Code C\/C++ extension May 2017 Update"},"content":{"rendered":"<p>Earlier this month, the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpptools\">C\/C++ extension for Visual Studio Code<\/a> hit another exciting milestone \u2013 it has been installed over 1.5 million times since it first shipped in March last year! Thanks to everyone who has sent us feedback to help us make it this far. We will continue to make improvements to the extension based on your feedback.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/1-download.png\"><img decoding=\"async\" width=\"500\" height=\"122\" class=\"alignnone wp-image-15926 size-mediumlarge\" alt=\"1-download\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/1-download-500x122.png\" \/><\/a><\/p>\n<p>Today we are shipping the May 2017 update to the <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpptools\">C\/C++ extension for Visual Studio Code<\/a>. In addition to several bug fixes, this update added auto-completion for keywords, enables <a href=\"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2017\/04\/25\/visual-studio-code-cc-extension-april-2017-update\/\">error squiggles and quick info which shipped in April as experimental features<\/a>, and improves the experience to configure debugger settings, making it much easier to get started with debugging C\/C++ code in VS Code.<\/p>\n<p>The <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/cc-extension-for-visual-studio-code\/\">original blog post,<\/a> which\u00a0provides an overview of this extension,\u00a0has been updated with these changes. If you have this extension installed already, Visual Studio Code sends a notification for the update and installs the update for you automatically. If you haven\u2019t installed it before, <a href=\"https:\/\/marketplace.visualstudio.com\/items?itemName=ms-vscode.cpptools\">download the C\/C++ extension for Visual Studio Code<\/a> to try it out.<\/p>\n<h2>Improved experience to debugger configuration<\/h2>\n<p>One of the common pieces of user feedback we\u2019ve heard constantly is that configuring the debugger is challenging. In this update, we simplified the default configuration in the debugger configuration file (launch.json) to make it relevant to the OS that you\u2019re debugging on, and also now provides snippets to make it easier to add additional configurations.<\/p>\n<p>After installing the May 2017 release of the extension, VS Code will prompt to be reloaded for the new configuration experience to take effect. This will only happen the first time the extension is installed\/updated and activated.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/2-reload.png\"><img decoding=\"async\" width=\"706\" height=\"36\" class=\"alignnone size-large wp-image-15935\" alt=\"2-reload\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/2-reload.png\" \/><\/a><\/p>\n<h3>Default configuration<\/h3>\n<p>To start debugging, first click on the <em>Debug<\/em> button on the left side of the VSCode window, then click on the gear icon at the top and type in \u201cC++\u201d in the Command Palette to find the debugger options.<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/3-debug-options.png\"><img decoding=\"async\" width=\"500\" height=\"214\" class=\"alignnone wp-image-15975 size-mediumlarge\" alt=\"3-debug-options\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/3-debug-options-500x214.png\" \/><\/a><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/3-start-debugging.png\"><\/a><\/p>\n<p>For example, selecting the <em>C++ (GDB\/LLDB)<\/em> option on a Windows machine will create a new launch.json file, if it doesn\u2019t exist, with the following default configuration:<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/4-inistal-setting.gif\"><img decoding=\"async\" width=\"879\" height=\"545\" class=\"alignnone size-large wp-image-15947\" alt=\"4-inistal-setting\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/4-inistal-setting.gif\" \/><\/a><\/p>\n<p>Note that the newly-created launch.json file is much simpler and shorter than it was before. It now only contains one configuration to help you launch and debug your current application on the OS that VS Code is running on. The only things that you need to fill in here are:<\/p>\n<ul>\n<li><strong>miDebuggerPath<\/strong>: replace the value with the path to the GDB debugger on your machine<\/li>\n<li><strong>program<\/strong>: replace the value with the path to your program executable<\/li>\n<li><strong>args<\/strong>: any arguments you want to pass to your program<\/li>\n<\/ul>\n<p>Once these are completed, you can hit the green arrow button or press F5 to start debugging.<\/p>\n<h3>Add additional configurations<\/h3>\n<p>If you want to do other types of debugging, clicking the blue &#8220;Add Configuration&#8230;&#8221; button within the launch.json file will allow you to add other configurations. This button brings up a snippet list which shows the configurations that are applicable to the host OS. For example, the list on Windows (the first screenshot) and the list on Linux (the second screenshot) look like the following:<\/p>\n<p>Configurations available on Windows:<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/5-windows.png\"><img decoding=\"async\" width=\"599\" height=\"269\" class=\"alignnone size-large wp-image-15955\" alt=\"5-windows\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/5-windows.png\" \/><\/a><\/p>\n<p>Configurations available on Linux:<a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/6-linux.png\"><img decoding=\"async\" width=\"606\" height=\"262\" class=\"alignnone size-large wp-image-15965\" alt=\"6-linux\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/6-linux.png\" \/><\/a><\/p>\n<p>Selecting a snippet from the list will add a new configuration in your launch.json file.<\/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>. If you haven\u2019t already provided us feedback, please take this <a href=\"https:\/\/www.surveymonkey.com\/r\/X6ZSTP5\">quick survey<\/a> to help shape this extension for your needs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Earlier this month, the C\/C++ extension for Visual Studio Code hit another exciting milestone \u2013 it has been installed over 1.5 million times since it first shipped in March last year! Thanks to everyone who has sent us feedback to help us make it this far. We will continue to make improvements to the extension [&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-15925","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>Earlier this month, the C\/C++ extension for Visual Studio Code hit another exciting milestone \u2013 it has been installed over 1.5 million times since it first shipped in March last year! Thanks to everyone who has sent us feedback to help us make it this far. We will continue to make improvements to the extension [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/15925","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=15925"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/15925\/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=15925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=15925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=15925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}