You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7dac016
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -24,7 +24,7 @@ Use the *launch.vs.json* file to configure debugging parameters. To create the f
24
24
|noDebug|boolean|Specifies whether or not to debug the launched program. The default value for this parameter is false if not specified.|
25
25
|stopOnEntry|boolean|Specifies whether or not to break a soon as the process is launched and the debugger attaches. The default value for this parameter is false.|
26
26
|remoteMachine|string|Specifies the name of the remote machine where the program is launched.|
27
-
|env|array|(Deprecated. Use the `env.NAME` syntax instead.) Specifies a key-value list of custom environment variables. env":{"myEnv":"myVal"}.|
27
+
|env|array|Specifies a key-value list of custom environment variables. env:{"myEnv":"myVal"}.|
28
28
|portName|string|Specifies the name of port when attaching to a running process.|
29
29
|buildConfigurations|array| A key-value pair that specifies the name of the build mode to apply the configurations. For example `Debug` or `Release` and the configurations to use according to the selected build mode. See example below.
Copy file name to clipboardExpand all lines: docs/build/open-folder-projects-cpp.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
2
title: "Open Folder support for C++ build systems in Visual Studio"
3
-
ms.date: "03/21/2019"
3
+
ms.date: "08/20/2019"
4
4
helpviewer_keywords: ["Open Folder Projects in Visual Studio"]
5
5
ms.assetid: abd1985e-3717-4338-9e80-869db5435175
6
6
---
7
-
# Open Folder projects for C++
7
+
# Open Folder support for C++ build systems in Visual Studio
8
8
9
9
::: moniker range="vs-2015"
10
10
@@ -14,7 +14,7 @@ The Open Folder feature is available in Visual Studio 2017 and later.
14
14
15
15
::: moniker range=">=vs-2017"
16
16
17
-
In Visual Studio 2017 and later, the "Open Folder" feature enables you to open a folder of source files and immediately start coding with support for IntelliSense, browsing, refactoring, debugging, and so on. As you edit, create, move, or delete files, Visual Studio tracks the changes automatically and continuously updates its IntelliSense index. No .sln or .vcxproj files are loaded; if needed, you can specify custom tasks as well as build and launch parameters through simple .json files. For general information about Open Folder, see [Develop code in Visual Studio without projects or solutions](/visualstudio/ide/develop-code-in-visual-studio-without-projects-or-solutions).
17
+
In Visual Studio 2017 and later, the "Open Folder" feature enables you to open a folder of source files and immediately start coding with support for IntelliSense, browsing, refactoring, debugging, and so on. As you edit, create, move, or delete files, Visual Studio tracks the changes automatically and continuously updates its IntelliSense index. No .sln or .vcxproj files are loaded; if needed, you can specify custom tasks as well as build and launch parameters through simple .json files. This feature enables you to integrate any third-party build system into Visual Studio. For general information about Open Folder, see [Develop code in Visual Studio without projects or solutions](/visualstudio/ide/develop-code-in-visual-studio-without-projects-or-solutions).
18
18
19
19
## CMake and Qt
20
20
@@ -28,8 +28,9 @@ To use the Visual Studio IDE with a build system or compiler toolset that is not
28
28
|-|-|
29
29
|CppProperties.json|Specify custom configuration information for browsing. Create this file, if needed, in your root project folder. (Not used in CMake projects.)|
30
30
|tasks.vs.json|Specify custom build commands. Accessed via the **Solution Explorer** context menu item **Configure Tasks**.|
31
-
|launch.vs.json|Specify command line arguments for the debugger. Accessed via the **Solution Explorer** context menu item **Debug and Launch Settings**.|`
32
-
## Configure IntelliSense and browsing hints with CppProperties.json
31
+
|launch.vs.json|Specify command line arguments for the debugger. Accessed via the **Solution Explorer** context menu item **Debug and Launch Settings**.|
32
+
33
+
## Configure code navigation with CppProperties.json
33
34
34
35
For IntelliSense and browsing behavior such as **Go to Definition** to work correctly, Visual Studio needs to know which compiler you are using, where the system headers are, and where any additional include files are located if they are not directly in the folder you have opened (the workspace folder). To specify a configuration, you can choose **Manage Configurations** from the dropdown in the main toolbar:
35
36
@@ -147,16 +148,16 @@ This creates (or opens) the *tasks.vs.json* file in the .vs folder which Visual
147
148
148
149
```
149
150
150
-
The JSON file is placed in the *.vs* subfolder which you can see if you click on the **Show All Files** button at the top of **Solution Explorer**. You can run this task by right-clicking on the project node in **Solution Explorer** and choosing **build hello**. When the task completes you should see a new file, *hello.exe* in **Solution Explorer**.
151
+
The JSON file is placed in the *.vs* subfolder which you can see if you click on the **Show All Files** button at the top of **Solution Explorer**. You can run this task by right-clicking on the root node in **Solution Explorer** and choosing **build hello**. When the task completes you should see a new file, *hello.exe* in **Solution Explorer**.
151
152
152
-
You can define many kinds of tasks. The following example shows a *tasks.vs.json file* that defines a single task. `taskName` defines the name that appears in the context menu. `appliesTo` defines which files the command can be performed on. The `command` property refers to the COMSPEC environment variable, which identifies the path for the console (*cmd.exe* on Windows). You can also reference environment variables that are declared in CppProperties.json or CMakeSettings.json. The `args` property specifies the command line to be invoked. The `${file}` macro retrieves the selected file in **Solution Explorer**. The following example will display the filename of the currently selected .cpp file.
153
+
You can define many kinds of tasks. The following example shows a *tasks.vs.json file* that defines a single task. `taskLabel` defines the name that appears in the context menu. `appliesTo` defines which files the command can be performed on. The `command` property refers to the COMSPEC environment variable, which identifies the path for the console (*cmd.exe* on Windows). You can also reference environment variables that are declared in CppProperties.json or CMakeSettings.json. The `args` property specifies the command line to be invoked. The `${file}` macro retrieves the selected file in **Solution Explorer**. The following example will display the filename of the currently selected .cpp file.
153
154
154
155
```json
155
156
{
156
157
"version": "0.2.1",
157
158
"tasks": [
158
159
{
159
-
"taskName": "Echo filename",
160
+
"taskLabel": "Echo filename",
160
161
"appliesTo": "*.cpp",
161
162
"type": "command",
162
163
"command": "${env.COMSPEC}",
@@ -172,7 +173,7 @@ For more information, see [Tasks.vs.json schema reference](tasks-vs-json-schema-
172
173
173
174
### Configure debugging parameters with launch.vs.json
174
175
175
-
To customize your program’s command line arguments and debugging instructions, right-click on the executable in **Solution Explorer** and select **Debug and Launch Settings**. This will open an existing *launch.vs.json* file, or if none exists, it will create a new file with a minimal task defined. First you are given a choice of what kind of debug session you want to configure. For debugging a MinGw-w64 project, we choose **C/C++ Launch for MinGGW/Cygwin (gdb)**. This creates a launch configuration for using *gdb.exe* with some educated guesses about default values. One of those default values is `MINGW_PREFIX`. You can substitute the literal path (as shown below) or you can define a `MINGW_PREFIX` property in *CppProperties.json*:
176
+
To customize your program’s command line arguments and debugging instructions, right-click on the executable in **Solution Explorer** and select **Debug and Launch Settings**. This will open an existing *launch.vs.json* file, or if none exists, it will create a new file with a set of minimal launch settings. First you are given a choice of what kind of debug session you want to configure. For debugging a MinGw-w64 project, we choose **C/C++ Launch for MinGGW/Cygwin (gdb)**. This creates a launch configuration for using *gdb.exe* with some educated guesses about default values. One of those default values is `MINGW_PREFIX`. You can substitute the literal path (as shown below) or you can define a `MINGW_PREFIX` property in *CppProperties.json*:
176
177
177
178
```json
178
179
{
@@ -198,7 +199,7 @@ To start debugging, choose the executable in the debug dropdown, then click the
198
199
199
200

200
201
201
-
You should see the **Initializing Debugger** dialog and then an external console window that is running your program.`
202
+
You should see the **Initializing Debugger** dialog and then an external console window that is running your program.
202
203
203
204
For more information, see [launch.vs.json schema reference](launch-vs-schema-reference-cpp.md).
Copy file name to clipboardExpand all lines: docs/build/tasks-vs-json-schema-reference-cpp.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
2
title: "tasks.vs.json schema reference (C++)"
3
-
ms.date: "08/09/2019"
3
+
ms.date: "08/20/2019"
4
4
helpviewer_keywords: ["tasks.vs.json file [C++]"]
5
5
ms.assetid: abd1985e-3717-4338-9e80-869db5435175
6
6
---
7
7
# tasks.vs.json schema reference (C++)
8
8
9
-
To tell Visual Studio how to build your source code in an an Open Folder project, add a *tasks.vs.json* file. You can define any arbitrary task here and then invoke it from the **Solution Explorer** context menu. CMake projects do not use this file because all the build commands are specified in *CMakeLists.txt*. For build systems other than CMake, *tasks.vs.json* is where you can specify build commands and invoke build scripts. For general information about using *tasks.vs.json*, see [Customize build and debug tasks for "Open Folder" development](/visualstudio/ide/customize-build-and-debug-tasks-in-visual-studio).
9
+
To tell Visual Studio how to build your source code in an Open Folder project, add a *tasks.vs.json* file. You can define any arbitrary task here and then invoke it from the **Solution Explorer** context menu. CMake projects do not use this file because all the build commands are specified in *CMakeLists.txt*. For build systems other than CMake, *tasks.vs.json* is where you can specify build commands and invoke build scripts. For general information about using *tasks.vs.json*, see [Customize build and debug tasks for "Open Folder" development](/visualstudio/ide/customize-build-and-debug-tasks-in-visual-studio).
10
10
11
11
A task has a `type` property which may have one of four values: `default`, `launch`, `remote`, or `msbuild`. Most tasks should use `launch` unless a remote connection is required.
12
12
@@ -17,7 +17,6 @@ The default properties are available on all types of tasks:
17
17
||||
18
18
|-|-|-|
19
19
|**Property**|**Type**|**Description**|
20
-
|`taskName`|string| Specifies the task label used in the user interface (Deprecated: Use `taskLabel` instead).|
21
20
|`taskLabel`|string| (Required.) Specifies the task label used in the user interface.|
22
21
|`appliesTo`|string| (Required.) Specifies which files the command can be performed on. The use of wildcards is supported, for example: "*", "*.cpp", "/*.txt"|
23
22
|`contextType`|string| Allowed values: "custom", "build", "clean", "rebuild". Determines where in the context menu the task will appear. Defaults to "custom".|
@@ -38,7 +37,7 @@ When the task type is `launch`, these properties are available:
38
37
|`workingDirectory`|string| Specifies the directory in which the command will run. Defaults to the project's current working directory.|
39
38
|`customLaunchCommand`|string| Specifies a global scope customization to apply before executing the command. Useful for setting environment variables like %PATH%.|
40
39
|`customLaunchCommandArgs`|string| Specifies arguments to customLaunchCommand. (Requires `customLaunchCommand`.)|
41
-
|`envVars`|object| (Deprecated.) Use env.NAME syntax to specify environment variables.|
40
+
`env`| Specifies a key-value list of custom environment variables. For example, "myEnv": "myVal"|
42
41
|`commands`|array| Specifies a list of commands to invoke in order.|
43
42
44
43
### Example
@@ -104,7 +103,7 @@ The following task will appear in the context menu when you right-click on *main
0 commit comments