Skip to content

Commit 74e0bd9

Browse files
gregg-miskellyrajkumar42
authored andcommitted
Launch json program doc fix (#1673)
* Update launch.json documentation/template to make 'program' more clear A few customers were confused as to what they should put in launch.json, and thought that '<target-framework>' might be something that would be automaticially figured out. This changes '<target-framework>' and similar values to '<insert-target-framework-here>', and updates the documentation to hopefully be a bit more clear. * Use '(prop)' instead of '<prop>' to avoid escaping problems * debugger-launchjson.md: Put example value in a code block
1 parent 82cb4ff commit 74e0bd9

File tree

4 files changed

+24
-20
lines changed

4 files changed

+24
-20
lines changed

debugger-launchjson.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,16 @@ The `preLaunchTask` field runs the associated taskName in tasks.json before debu
1818
This will create a task that runs `dotnet build`. You can read more about tasks at [https://code.visualstudio.com/docs/editor/tasks](https://code.visualstudio.com/docs/editor/tasks).
1919

2020
## Program
21-
The program field is set to the path to the application dll or .NET Core host executable to launch.
21+
The program field is set to the path of the application dll or .NET Core host executable to launch.
2222

23-
Example: "${workspaceRoot}/bin/Debug/\<target-framework\>/\<project-name.dll\>" where:
23+
This property normally takes the form: "${workspaceRoot}/bin/Debug/\<target-framework\>/\<project-name.dll\>".
2424

25-
* \<target-framework\>: (example: 'netstandard1.5') This is the framework that the app is being built for. It is set in the project.json file.
26-
* \<project-name\>: (example: 'MyApp') The name of the project being debugged.",
25+
Example: `"${workspaceRoot}/bin/Debug/netcoreapp1.1/MyProject.dll"`
26+
27+
Where:
28+
29+
* \<target-framework\> is the framework that the debugged project is being built for. This is normally found in the project file as the 'TargetFramework' property.
30+
* \<project-name.dll\> is the name of debugged project's build output dll. This is normally the same as the project file name but with a '.dll' extension.
2731

2832
## Cwd
2933
The working directory of the target process.

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@
252252
"type": "string"
253253
},
254254
"default": {
255-
"<source-path>": "<target-path>"
255+
"<insert-source-path-here>": "<insert-target-path-here>"
256256
}
257257
},
258258
"justMyCode": {
@@ -477,8 +477,8 @@
477477
"properties": {
478478
"program": {
479479
"type": "string",
480-
"description": "Path to the application dll or .NET Core host executable to launch. Example: '${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>' where:\n<target-framework>: (example: 'netstandard1.5') This is the name of the framework that the app is being built for. It is set in the project.json file.\n<project-name>: (example: 'MyApp') The name of the project being debugged.",
481-
"default": "${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>"
480+
"description": "Path to the application dll or .NET Core host executable to launch.\nThis property normally takes the form: '${workspaceRoot}/bin/Debug/(target-framework)/(project-name.dll)'\nExample: '${workspaceRoot}/bin/Debug/netcoreapp1.1/MyProject.dll'\n\nWhere:\n(target-framework) is the framework that the debugged project is being built for. This is normally found in the project file as the 'TargetFramework' property.\n(project-name.dll) is the name of debugged project's build output dll. This is normally the same as the project file name but with a '.dll' extension.",
481+
"default": "${workspaceRoot}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll"
482482
},
483483
"cwd": {
484484
"type": "string",
@@ -643,7 +643,7 @@
643643
"type": "string"
644644
},
645645
"default": {
646-
"<source-path>": "<target-path>"
646+
"<insert-source-path-here>": "<insert-target-path-here>"
647647
}
648648
},
649649
"justMyCode": {
@@ -951,7 +951,7 @@
951951
"type": "string"
952952
},
953953
"default": {
954-
"<source-path>": "<target-path>"
954+
"<insert-source-path-here>": "<insert-target-path-here>"
955955
}
956956
},
957957
"justMyCode": {
@@ -1334,7 +1334,7 @@
13341334
"type": "coreclr",
13351335
"request": "launch",
13361336
"preLaunchTask": "build",
1337-
"program": "${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>",
1337+
"program": "${workspaceRoot}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll",
13381338
"args": [],
13391339
"cwd": "${workspaceRoot}",
13401340
"stopAtEntry": false,
@@ -1345,7 +1345,7 @@
13451345
"type": "coreclr",
13461346
"request": "launch",
13471347
"preLaunchTask": "build",
1348-
"program": "${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>",
1348+
"program": "${workspaceRoot}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll",
13491349
"args": [],
13501350
"cwd": "${workspaceRoot}",
13511351
"stopAtEntry": false,
@@ -1404,8 +1404,8 @@
14041404
"properties": {
14051405
"program": {
14061406
"type": "string",
1407-
"description": "Path to the application dll or .NET Core host executable to launch. Example: '${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>' where:\n<target-framework>: (example: 'netstandard1.5') This is the name of the framework that the app is being built for. It is set in the project.json file.\n<project-name>: (example: 'MyApp') The name of the project being debugged.",
1408-
"default": "${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>"
1407+
"description": "Path to the application dll or .NET Core host executable to launch.\nThis property normally takes the form: '${workspaceRoot}/bin/Debug/(target-framework)/(project-name.dll)'\nExample: '${workspaceRoot}/bin/Debug/netcoreapp1.1/MyProject.dll'\n\nWhere:\n(target-framework) is the framework that the debugged project is being built for. This is normally found in the project file as the 'TargetFramework' property.\n(project-name.dll) is the name of debugged project's build output dll. This is normally the same as the project file name but with a '.dll' extension.",
1408+
"default": "${workspaceRoot}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll"
14091409
},
14101410
"cwd": {
14111411
"type": "string",
@@ -1570,7 +1570,7 @@
15701570
"type": "string"
15711571
},
15721572
"default": {
1573-
"<source-path>": "<target-path>"
1573+
"<insert-source-path-here>": "<insert-target-path-here>"
15741574
}
15751575
},
15761576
"justMyCode": {
@@ -1878,7 +1878,7 @@
18781878
"type": "string"
18791879
},
18801880
"default": {
1881-
"<source-path>": "<target-path>"
1881+
"<insert-source-path-here>": "<insert-target-path-here>"
18821882
}
18831883
},
18841884
"justMyCode": {

src/assets.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export class AssetGenerator {
126126
private computeProgramPath() {
127127
if (!this.hasProject) {
128128
// If there's no target project data, use a placeholder for the path.
129-
return '${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>';
129+
return '${workspaceRoot}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll';
130130
}
131131

132132
let result = '${workspaceRoot}';

src/tools/OptionsSchema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@
261261
"properties": {
262262
"program": {
263263
"type": "string",
264-
"description": "Path to the application dll or .NET Core host executable to launch. Example: '${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>' where:\n<target-framework>: (example: 'netstandard1.5') This is the name of the framework that the app is being built for. It is set in the project.json file.\n<project-name>: (example: 'MyApp') The name of the project being debugged.",
265-
"default": "${workspaceRoot}/bin/Debug/<target-framework>/<project-name.dll>"
264+
"description": "Path to the application dll or .NET Core host executable to launch.\nThis property normally takes the form: '${workspaceRoot}/bin/Debug/(target-framework)/(project-name.dll)'\nExample: '${workspaceRoot}/bin/Debug/netcoreapp1.1/MyProject.dll'\n\nWhere:\n(target-framework) is the framework that the debugged project is being built for. This is normally found in the project file as the 'TargetFramework' property.\n(project-name.dll) is the name of debugged project's build output dll. This is normally the same as the project file name but with a '.dll' extension.",
265+
"default": "${workspaceRoot}/bin/Debug/<insert-target-framework-here>/<insert-project-name-here>.dll"
266266
},
267267
"cwd": {
268268
"type": "string",
@@ -340,7 +340,7 @@
340340
"type": "string"
341341
},
342342
"default": {
343-
"<source-path>": "<target-path>"
343+
"<insert-source-path-here>": "<insert-target-path-here>"
344344
}
345345
},
346346
"justMyCode": {
@@ -406,7 +406,7 @@
406406
"type": "string"
407407
},
408408
"default": {
409-
"<source-path>": "<target-path>"
409+
"<insert-source-path-here>": "<insert-target-path-here>"
410410
}
411411
},
412412
"justMyCode": {

0 commit comments

Comments
 (0)