{"id":10687,"date":"2016-10-05T11:00:21","date_gmt":"2016-10-05T18:00:21","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/?p=10687"},"modified":"2019-02-18T18:04:41","modified_gmt":"2019-02-18T18:04:41","slug":"bring-your-c-codebase-to-visual-studio-with-open-folder","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/bring-your-c-codebase-to-visual-studio-with-open-folder\/","title":{"rendered":"Bring your C++ codebase to Visual Studio with &#8220;Open Folder&#8221;"},"content":{"rendered":"<p><span style=\"color: #808080\"><em><span style=\"color: #339966\">\u23f1 Updated on <strong>March\u00a006,\u00a02017<\/strong> with the latest functionality in <strong>Visual Studio 2017\u00a0RTW<\/strong><\/span>\n<\/em><\/span><\/p>\n<p>Welcome to Visual Studio 2017! Starting with this release, Visual Studio supports opening folders containing source code without the need to create any solutions or projects. This makes it a lot simpler to get started with Visual Studio, even if your project is not an MSBuild-based project. The new functionality, &#8220;Open Folder&#8221;, also offers a more natural source file management as well as access to the powerful code understanding, editing, building and debugging capabilities that Visual Studio already provides for MSBuild projects.<\/p>\n<p>This post describes the <strong>&#8220;Open Folder&#8221; support for C++ codebases<\/strong>. You will learn how to use &#8220;Open Folder&#8221; to easily:<\/p>\n<ul>\n<li><a href=\"#read-code\">read C++ code<\/a><\/li>\n<li><a href=\"#edit-code\">edit C++ code<\/a><\/li>\n<li><a href=\"#customize\">customize the reading and editing experience<\/a><\/li>\n<li><a href=\"#build-code\">build C++ projects<\/a><\/li>\n<li><a href=\"#debug-code\">debug C++ binaries<\/a><\/li>\n<\/ul>\n<p>All this without having to create and maintain any .vcxproj or .sln files.<\/p>\n<h3>Getting started with &#8220;Open Folder&#8221; for C++<\/h3>\n<p>The new functionality in Visual Studio 2017 called &#8220;<a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/2016\/04\/12\/open-any-folder-with-visual-studio-15-preview\/\">Open Folder<\/a>&#8221; has full support for C++.\u00a0<strong>If you have a CMake-based project, take a look also at this post describing our <a href=\"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2016\/10\/05\/cmake-support-in-visual-studio\/\"><span style=\"color: #000000\">Visual Studio&#8217;s streamlined &#8220;Open Folder&#8221; experience for CMake<\/span><\/a><\/strong>. If your project is using another build system, read on.<\/p>\n<p>When you install the product, make sure to <strong>install one of the C++ workloads<\/strong> e.g. &#8220;Desktop development with C++&#8221; or &#8220;Game development with C++&#8221;.<\/p>\n<p>After that, all you have to do is run the &#8220;Open Folder&#8221; command and select the folder you want to browse (either from <strong>File<\/strong> &gt; <strong>Open<\/strong> &gt; <strong>Folder<\/strong> or <strong>Quick Launch<\/strong>) or directly launch <strong>devenv.exe &lt;foldername&gt;<\/strong> from the command prompt.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-openfolder.png\"><img decoding=\"async\" width=\"537\" height=\"135\" class=\"alignnone size-full wp-image-10695\" alt=\"openfolder\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-openfolder.png\" \/><\/a><\/p>\n<h3><a id=\"read-code\"><\/a>Reading C++ code<\/h3>\n<p>As soon as you open the folder, Solution Explorer will immediately display the files in that folder and you can open any files in the editor. In the background, Visual Studio will start indexing the C++ sources in your folder.<\/p>\n<p>You now have access to all the Visual Studio capabilities of reading and browsing C++ code (e.g. Find all references, Go to symbol, Peek definition, Semantic colorization and highlighting, Class View, Call Hierarchy, to name a few).<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-navigation.png\"><img decoding=\"async\" width=\"1124\" height=\"746\" class=\"alignnone size-full wp-image-11875\" alt=\"anycode-rc0-navigation\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-navigation.png\" \/><\/a><\/p>\n<h3><a id=\"edit-code\"><\/a>Editing C++ code<\/h3>\n<p>All these C++ browsing and navigation services work without you having to create any Visual C++ projects like you would&#8217;ve in previous Visual Studio releases (through the &#8220;<a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/b9cy3d6x.aspx\">Create Project from Existing Code<\/a>&#8221; wizard).<\/p>\n<p>As you create, rename or remove source files from your project, you don&#8217;t have to worry anymore about updating the Visual C++ projects as well &#8211; Visual Studio will rely on the folder structure and monitor changes on disk as needed. Also, when you edit code, Visual Studio\u2019s IntelliSense will continue updating and assisting you with the latest information from your sources.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-isense-update.png\"><img decoding=\"async\" width=\"522\" height=\"284\" class=\"alignnone size-full wp-image-10725\" alt=\"isense-update\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-isense-update.png\" \/><\/a><\/p>\n<p>While editing your code, you can also use all of the <a href=\"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2014\/11\/14\/all-about-c-refactoring-in-visual-studio-2015-preview\/\">refactoring features that Visual Studio supports for C++<\/a> e.g. Rename symbol, Extract function, Move definition location, Change signature, Convert to raw string literals, etc.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rename-refactor.png\"><img decoding=\"async\" width=\"676\" height=\"505\" class=\"alignnone size-full wp-image-10745\" alt=\"rename-refactor\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rename-refactor.png\" \/><\/a><\/p>\n<h3><a id=\"customize\"><\/a>Customizing C++ configuration settings<\/h3>\n<p>By default, VS will provide two C++ configurations for IntelliSense and browsing: Debug and Release. These configurations are consistent with the configurations provided by <a href=\"https:\/\/devblogs.microsoft.com\/cppblog\/single-file-intellisense-and-other-ide-improvements-in-vs2015\/\">Single File IntelliSense<\/a> functionality introduced in VS 2015.<\/p>\n<p>Depending on the project, you may need to customize these configurations with more information about your source code e.g. additional include paths, additional defines or compiler switches. To do that, create a file called <strong>CppProperties.json<\/strong> in the root folder \u2013 this file will aid in configuring C++ IntelliSense and browsing.<\/p>\n<p><strong>CppProperties.json:<\/strong><\/p>\n<pre class=\"prettyprint\">{\n  &quot;configurations&quot;: [\n    {\n      &quot;name&quot;: &quot;Windows x64&quot;,\n      &quot;includePath&quot;: [ &quot;include&quot; ],\n      &quot;defines&quot;: [ &quot;_DEBUG&quot; ],\n      &quot;compilerSwitches&quot;: &quot;\/std:c++14&quot;,\n      &quot;intelliSenseMode&quot;: &quot;msvc-x64&quot;,\n      &quot;forcedInclude&quot;: [ &quot;pch.h&quot; ],\n      &quot;undefines&quot;: []\n    }\n  ]\n}<\/pre>\n<p>The following properties are available for a given configuration:<\/p>\n<ul>\n<li><strong>name<\/strong>: is the configuration name that will show up in the C++ configuration dropdown<\/li>\n<li><strong>includePath<\/strong>: the list of folders that should be specified in the include path (maps to \/I for most compilers)<\/li>\n<li><strong>defines<\/strong>: the list of macros that should be defined (maps to \/D for most compilers)<\/li>\n<li><strong>compilerSwitches<\/strong>: to specify one or more additional switches that can influence IntelliSense behavior<\/li>\n<li><strong>forcedInclude<\/strong>: specifies a header to be automatically included in every compilation unit (maps to \/FI for MSVC or -include for clang)<\/li>\n<li><strong>undefines<\/strong>: list of macros to be undefined (maps to \/U for MSVC)<\/li>\n<li><strong>intelliSenseMode<\/strong>: specifies the IntelliSense engine to be used. You can specify the architecture specific variants for either MSVC or Clang:\n<ul>\n<li><em>msvc-x86 (the default)<\/em><\/li>\n<li><em>msvc-x64<\/em><\/li>\n<li>msvc<em>-arm<\/em><\/li>\n<li><em>windows-clang-x86<\/em><\/li>\n<li><em>windows-clang-x64<\/em><\/li>\n<li><em>windows-clang-arm<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>This file supports <strong>environment variable expansion<\/strong> for include paths and other property values. The syntax is ${env.FOODIR} to expand an environment variable %FOODIR%.<\/p>\n<p>You also have access to built-in macros inside this file:<\/p>\n<ul>\n<li><em>${workspaceRoot}<\/em> \u2013 provides the full path to the workspace folder<\/li>\n<li><em>${projectRoot}<\/em> \u2013 full path to the folder where CppProperties.json is placed<\/li>\n<li><em>${vsInstallDir}<\/em> \u2013 full path to the folder where the running instance of VS 2017 is installed<\/li>\n<\/ul>\n<p>For example, if your project has an <em>include<\/em> folder and also includes <em>windows.h<\/em> and friends from the Windows SDK (which is common), you may want to update your configuration file with these includes:<\/p>\n<p><strong>CppProperties.json<\/strong>:<\/p>\n<pre class=\"prettyprint\">{\n  &quot;configurations&quot;: [\n    {\n      &quot;name&quot;: &quot;Windows&quot;,\n      &quot;includePath&quot;: [\n        \/\/ local include folder\n        &quot;${workspaceRoot}\\\\include&quot;,\n        \/\/ Windows SDK and CRT headers\n        &quot;${env.WindowsSdkDir}include\\\\${env.WindowsSDKVersion}\\\\ucrt&quot;,\n        &quot;${env.NETFXSDKDir}\\\\include\\\\um&quot;,\n        &quot;${env.WindowsSdkDir}include\\\\${env.WindowsSDKVersion}\\\\um&quot;,\n        &quot;${env.WindowsSdkDir}include\\\\${env.WindowsSDKVersion}\\\\shared&quot;,\n        &quot;${env.VCToolsInstallDir}include&quot;\n      ]\n    }\n  ]\n}<\/pre>\n<p><strong>Note<\/strong>: %WindowsSdkDir% and %VCToolsInstallDir% are not set as global environment variables so make sure you start \u00a0devenv.exe from a &#8220;Developer Command Prompt for VS 2017\u00a0&#8221; that defines these variables.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-cppprops-intellisense.png\"><img decoding=\"async\" width=\"672\" height=\"250\" class=\"alignnone size-full wp-image-11855\" alt=\"anycode-rc0-cppprops-intellisense\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-cppprops-intellisense.png\" \/><\/a><\/p>\n<p><strong>Tip:<\/strong> In general, the Error List window is a good starting point to review any IntelliSense errors caused by missing includes &#8211; filter its content to &#8220;IntelliSense only&#8221; and error code E1696:<\/p>\n<p><img decoding=\"async\" width=\"844\" height=\"279\" class=\"alignnone size-full wp-image-10715\" alt=\"errorlist-filtering\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-errorlist-filtering.png\" \/><\/p>\n<p>You can create as many configurations as you want in the CppProperties.json file and easily switch between them from the C++ configuration dropdown in the Standard toolbar<\/p>\n<p><strong>CppProperties.json<\/strong><\/p>\n<pre class=\"prettyprint\">{\n  &quot;configurations&quot;: [\n    {\n      &quot;name&quot;: &quot;Windows&quot;,\n      ...\n    },\n    {\n      &quot;name&quot;: &quot;with EXTERNAL_CODECS&quot;,\n      ...\n    }\n  ]\n}<\/pre>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-cppconfig-dropdown.png\"><img decoding=\"async\" width=\"701\" height=\"128\" class=\"alignnone size-full wp-image-11845\" alt=\"anycode-rc0-cppconfig-dropdown\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-cppconfig-dropdown.png\" \/><\/a><\/p>\n<h3><a id=\"build-code\"><\/a>Building C++ projects<\/h3>\n<p>You can automate build scripts or any other external operations on the files you have in your current workspace by running them as tasks directly in the IDE. You can configure a new task by right-clicking on a file or folder and select \u201c<strong>Customize Task Settings<\/strong>\u201d.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-tasksjson-menu.png\"><img decoding=\"async\" width=\"453\" height=\"463\" class=\"alignnone size-full wp-image-11915\" alt=\"anycode-rc0-tasksjson-menu\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-tasksjson-menu.png\" \/><\/a><\/p>\n<p>This will create a new file tasks.vs.json under the hidden .vs folder in your workspace and a new task that you can customize.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-tasksjson-intellisense.png\"><img decoding=\"async\" width=\"632\" height=\"248\" class=\"alignnone size-full wp-image-11905\" alt=\"anycode-rc0-tasksjson-intellisense\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-tasksjson-intellisense.png\" \/><\/a><\/p>\n<p>By default, a task can be executed from the context menu of the file in Solution Explorer. For each task, you will find a new entry at the bottom of the context menu.<\/p>\n<p><strong>Tasks.vs.json<\/strong><\/p>\n<pre class=\"prettyprint\">{\n  &quot;version&quot;: &quot;0.2.1&quot;,\n  &quot;tasks&quot;: [\n    {\n      &quot;taskName&quot;: &quot;Echo filename&quot;,\n      &quot;appliesTo&quot;: &quot;makefile&quot;,\n      &quot;type&quot;: &quot;command&quot;,\n      &quot;command&quot;: &quot;${env.COMSPEC}&quot;,\n      &quot;args&quot;: [&quot;echo ${file}&quot;]\n    }\n  ]\n}<\/pre>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-tasksjson-contextmenu.png\"><img decoding=\"async\" width=\"451\" height=\"484\" class=\"alignnone size-full wp-image-11895\" alt=\"anycode-rc0-tasksjson-contextmenu\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-tasksjson-contextmenu.png\" \/><\/a><\/p>\n<p>Just like CppProperties.json, in tasks.vs.json you can consume environment variables by using the syntax ${env.VARIABLE}.<\/p>\n<p>Additionally, you can use built-in macros inside your task properties:<\/p>\n<ul>\n<li><em>${workspaceRoot}<\/em> \u2013 provides the full path to the workspace folder<span style=\"color: #999999\"> (e.g. &#8220;C:\\sources\\hello&#8221;)<\/span><\/li>\n<li><em>${file}<\/em> \u2013 provides the full path of the file or folder selected to run this task against<span style=\"color: #999999\"> (e.g. &#8220;C:\\sources\\hello\\src\\hello.cpp&#8221;)<\/span><\/li>\n<li><em>${relativeFile}<\/em> &#8211; provides the relative path to the file or folder<span style=\"color: #999999\"> (e.g. \u00a0&#8220;src\\hello.cpp&#8221;)<\/span><\/li>\n<li><em>${fileBasename}<\/em> &#8211; provides the name of the file without path or extension<span style=\"color: #999999\"> (e.g. &#8220;hello&#8221;)<\/span><\/li>\n<li><em>${fileDirname}<\/em> &#8211; provides the the full path to the file, excluding the filename<span style=\"color: #999999\"> (e.g. &#8220;C:\\sources\\hello\\src&#8221;)<\/span><\/li>\n<li><em>${fileExtname}<\/em> &#8211; provides the extension of the selected file<span style=\"color: #999999\"> (e.g. &#8220;.cpp&#8221;)<\/span><\/li>\n<\/ul>\n<p>You can also specify additional user macros yourself that you can use in the task properties e.g. ${outDir} in the example below:<\/p>\n<p><strong>Tasks.vs.json<\/strong><\/p>\n<pre class=\"prettyprint\">{\n  &quot;version&quot;: &quot;0.2.1&quot;,\n  &quot;outDir&quot;: &quot;${workspaceRoot}\\\\bin&quot;,\n  &quot;tasks&quot;: [\n    {\n      &quot;taskName&quot;: &quot;List outputs&quot;,\n      &quot;appliesTo&quot;: &quot;*&quot;,\n      &quot;type&quot;: &quot;command&quot;,\n      &quot;command&quot;: &quot;${env.COMSPEC}&quot;,\n      &quot;args&quot;: [\n        &quot;dir ${outDir}&quot;\n      ]\n    }\n  ]\n}<\/pre>\n<p>By specifying the &#8220;contextType&#8221; for a given task to equal &#8220;<strong>build<\/strong>&#8220;, &#8220;<strong>clean<\/strong>&#8221; or &#8220;<strong>rebuild<\/strong>&#8221; you can wire up the VS build-in commands for Build, Clean and Rebuild that can be invoked from the context menu.<\/p>\n<p><strong>Tasks.vs.json<\/strong><\/p>\n<pre class=\"prettyprint\">{\n  &quot;version&quot;: &quot;0.2.1&quot;,\n  &quot;tasks&quot;: [\n    {\n      &quot;taskName&quot;: &quot;makefile-build&quot;,\n      &quot;appliesTo&quot;: &quot;makefile&quot;,\n      &quot;type&quot;: &quot;command&quot;,\n      &quot;contextType&quot;: &quot;build&quot;,\n      &quot;command&quot;: &quot;nmake&quot;\n    },\n    {\n      &quot;taskName&quot;: &quot;makefile-clean&quot;,\n      &quot;appliesTo&quot;: &quot;makefile&quot;,\n      &quot;type&quot;: &quot;command&quot;,\n      &quot;contextType&quot;: &quot;clean&quot;,\n      &quot;command&quot;: &quot;nmake&quot;,\n      &quot;args&quot;: [&quot;clean&quot;]\n    }\n  ]\n}<\/pre>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-tasksjson-build.png\"><img decoding=\"async\" width=\"454\" height=\"503\" class=\"alignnone size-full wp-image-11885\" alt=\"anycode-rc0-tasksjson-build\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-tasksjson-build.png\" \/><\/a><\/p>\n<p>You can create tasks for any file or folder by specifying its name in the &#8220;appliesTo&#8221; field. But to create more generic tasks you can use file masks. For example:<\/p>\n<ul>\n<li><em>\u201cappliesTo\u201d: \u201c*\u201d<\/em> \u2013 task is available to all files and folders in the workspace<\/li>\n<li><em>\u201cappliesTo\u201d: \u201c*\/\u201d<\/em> \u2013 task is available to all folders in the workspace<\/li>\n<li><em>\u201cappliesTo\u201d: \u201c*.cpp\u201d<\/em> \u2013 task is available to all files with the extension .cpp in the workspace<\/li>\n<li><em>\u201cappliesTo\u201d: \u201c\/*.cpp\u201d<\/em> \u2013 task is available to all files with the extension .cpp in the root of the workspace<\/li>\n<li><em>\u201cappliesTo\u201d: \u201csrc\/*\/\u201d<\/em> \u2013 task is available to all subfolders of the \u201csrc\u201d folder<\/li>\n<li><em>\u201cappliesTo\u201d: \u201cmakefile\u201d<\/em> \u2013 task is available to all makefile files in the workspace<\/li>\n<li><em>\u201cappliesTo\u201d: \u201c\/makefile\u201d<\/em> \u2013 task is available only on the makefile in the root of the workspace<\/li>\n<\/ul>\n<h3><a id=\"debug-code\"><\/a>Debugging C++ binaries<\/h3>\n<p>To get started with debugging in Visual Studio, you want to navigate in Solution Explorer to your executable. Then right click, and select &#8220;<strong>Debug<\/strong>&#8221; \u2013 this will immediately start a debugging session for this executable.<\/p>\n<p>Alternatively, you can specify an output binary in your task definition (via \u201coutput\u201d). Once you do that, this binary will be automatically launched under the debugger if you select the source file as a startup item (right click, \u201c<strong>Set as Startup Item<\/strong>\u201d) or just right-click on the source file and choose \u201c<strong>Debug<\/strong>\u201d.<\/p>\n<p><strong>Tasks.vs.json<\/strong><\/p>\n<pre class=\"prettyprint\">{\n  &quot;version&quot;: &quot;0.2.1&quot;,\n  &quot;tasks&quot;: [\n    {\n      &quot;taskName&quot;: &quot;makefile-build&quot;,\n      &quot;appliesTo&quot;: &quot;makefile&quot;,\n      &quot;type&quot;: &quot;command&quot;,\n      &quot;contextType&quot;: &quot;build&quot;,\n      &quot;command&quot;: &quot;nmake&quot;, \n      &quot;output&quot;: &quot;${workspaceRoot}\\\\bin\\\\hellomake.exe&quot;\n    }\n  ]\n}<\/pre>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-tasksjson-output.png\"><img decoding=\"async\" width=\"455\" height=\"385\" class=\"alignnone size-full wp-image-11925\" alt=\"anycode-rc0-tasksjson-output\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-rc0-tasksjson-output.png\" \/><\/a><\/p>\n<p>If you want to customize your program&#8217;s arguments, select &#8220;<strong>Debug and Launch Settings<\/strong>&#8221; instead. This will create a new <strong>launch.vs.json<\/strong> file prepopulated with the information about the program you have selected.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-debug-launchsettings.png\"><img decoding=\"async\" width=\"454\" height=\"460\" class=\"alignnone size-full wp-image-10755\" alt=\"debug-launchsettings\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-debug-launchsettings.png\" \/><\/a><\/p>\n<p>To specify additional arguments, just add them in the &#8220;args&#8221; JSON array as in the example below<\/p>\n<p><strong>launch.vs.json:<\/strong><\/p>\n<pre class=\"prettyprint\">\n{\n  &quot;version&quot;: &quot;0.2.1&quot;,\n  &quot;defaults&quot;: {},\n  &quot;configurations&quot;: [\n    {\n      &quot;type&quot;: &quot;default&quot;,\n      &quot;project&quot;: &quot;CPP\\\\7zip\\\\Bundles\\\\Alone\\\\O\\\\7za.exe&quot;,\n      &quot;name&quot;: &quot;7za.exe list content of helloworld.zip&quot;,\n      &quot;args&quot;: [ &quot;l&quot;, &quot;d:\\\\sources\\\\helloworld.zip&quot; ]\n    }\n  ]\n}\n<\/pre>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-launch-json-debug-target.png\"><img decoding=\"async\" width=\"562\" height=\"131\" class=\"alignnone size-full wp-image-10765\" alt=\"launch-json-debug-target\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-launch-json-debug-target.png\" \/><\/a><\/p>\n<p>As soon as you save this file, a new entry in the Debug Target dropdown will be available and you can select it to start the debugger. By editing the <strong>launch.vs.json<\/strong> file, you can create as many debug configurations as you like, for any number of executables. If you press <strong>F5<\/strong> now, the debugger will launch and hit any breakpoint you may have already set. All the familiar debugger windows and functionality is now available.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-debugging.png\"><img decoding=\"async\" width=\"1050\" height=\"390\" class=\"alignnone size-full wp-image-10775\" alt=\"debugging\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/anycode-debugging.png\" \/><\/a><\/p>\n<h3>What&#8217;s next<\/h3>\n<p><a href=\"https:\/\/aka.ms\/vs2017cpp\">Download Visual Studio 2017 today<\/a> and give &#8220;Open Folder&#8221; a try \u2013 no need to create VS projects and solution files anymore to become productive in VS.<\/p>\n<p>We\u2019re continuing work on making this experience even better. In upcoming releases, you will see us enhance the way the C++ browsing and navigation works, as well as supporting more debugger types, eventually reaching parity with our MSBuild-based project functionality. Your feedback is really important in informing our next steps so don&#8217;t hesitate to share it. We&#8217;re listening!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u23f1 Updated on March\u00a006,\u00a02017 with the latest functionality in Visual Studio 2017\u00a0RTW Welcome to Visual Studio 2017! Starting with this release, Visual Studio supports opening folders containing source code without the need to create any solutions or projects. This makes it a lot simpler to get started with Visual Studio, even if your project is [&hellip;]<\/p>\n","protected":false},"author":308,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[270,280,269],"tags":[8,140,339,308,6,309,268,185],"class_list":["post-10687","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-announcement","category-new-user","category-openfolder","tag-announcement","tag-c","tag-cppproperties-json","tag-existing-code","tag-ide","tag-import","tag-openfolder","tag-visual-studio"],"acf":[],"blog_post_summary":"<p>\u23f1 Updated on March\u00a006,\u00a02017 with the latest functionality in Visual Studio 2017\u00a0RTW Welcome to Visual Studio 2017! Starting with this release, Visual Studio supports opening folders containing source code without the need to create any solutions or projects. This makes it a lot simpler to get started with Visual Studio, even if your project is [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/10687","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\/308"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=10687"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/10687\/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=10687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=10687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=10687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}