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
This commit contains many improvements to our launch.json and task.json generation. Highlights:
- Schema related changes:
- Make most of the 'launchBrowser' attributes optional, remove the extra properties from the templates, and improve the schema
- In the configuration resolver, add a default value for 'cwd' if we are local debugging
- Generator related fixes:
- Use a quick pick to allow the user to select which project to launch. Before we would always launch the first one OmniSharp returned.
- Remove 'internalConsoleOptions' from the generated templates, and instead default it in the configuration resolver.
- Fix several problems with regenerating launch/tasks.json in the case that the file already existed. We had code to delete the files and recreate it, but the logic was wrong leading us to sometimes duplicate content or not create the file at all.
- Switch to using the '$tsc' problem matcher. We were using the '$msCompile' matcher, but that assumes that file names will be absolute paths, which isn't what 'dotnet build' provides.
- Stop supporting project.json based projects for purposes of generating launch/tasks.json. Continuing to support these now that we let the user pick the startup project was going to be more work than it made sense to support.
- In the case of generating launch.json through the configuration provider, we will no longer generate a set of generic configurations in error cases. We will now either use a fall back configuration which is designed to feel like an error, or we will put up an error prompt and return nothing.
- Allow generating a tasks.json even if there is no launchable project. Note that we will not automatically generate a tasks.json in this case as I wasn't sure people would really like this, but the 'Generate Assets' command will force it.
@@ -30,11 +30,12 @@ export class CSharpConfigurationProvider implements vscode.DebugConfigurationPro
30
30
* Note: serverUtils.requestWorkspaceInformation only retrieves one folder for multi-root workspaces. Therefore, generator will be incorrect for all folders
31
31
* except the first in a workspace. Currently, this only works if the requested folder is the same as the server's solution path or folder.
Copy file name to clipboardExpand all lines: src/tools/OptionsSchema.json
+17-47Lines changed: 17 additions & 47 deletions
Original file line number
Diff line number
Diff line change
@@ -176,35 +176,26 @@
176
176
},
177
177
"LaunchBrowserPlatformOptions": {
178
178
"type": "object",
179
+
"required": [ "command" ],
179
180
"properties": {
180
181
"command": {
181
182
"type": "string",
182
-
"description": "The command to execute for launching the web browser",
183
+
"description": "The executable which will start the web browser",
183
184
"default": "open"
184
185
},
185
186
"args": {
186
187
"type": "string",
187
-
"description": "The arguments to pass to the command to open the browser. Use ${auto-detect-url} to automatically use the address the server is listening to",
188
+
"description": "The arguments to pass to the command to open the browser. Use ${auto-detect-url} to automatically use the address the server is listening to.",
188
189
"default": "${auto-detect-url}"
189
190
}
190
191
}
191
192
},
192
193
"LaunchBrowser": {
193
194
"type": "object",
194
-
"description": "Describes options to launch a web browser as part of launch",
195
+
"required": [ "enabled" ],
196
+
"description": "Configures starting a web browser as part of the launch -- should a web browser be started, and if so, what command should be run to start it. This option can be modified to launch a specific browser.",
195
197
"default": {
196
-
"enabled": true,
197
-
"args": "${auto-detect-url}",
198
-
"windows": {
199
-
"command": "cmd.exe",
200
-
"args": "/C start ${auto-detect-url}"
201
-
},
202
-
"osx": {
203
-
"command": "open"
204
-
},
205
-
"linux": {
206
-
"command": "xdg-open"
207
-
}
198
+
"enabled": true
208
199
},
209
200
"properties": {
210
201
"enabled": {
@@ -213,39 +204,29 @@
213
204
"default": true
214
205
},
215
206
"args": {
216
-
"anyOf": [
217
-
{
218
-
"type": "array",
219
-
"description": "Command line arguments passed to the program.",
220
-
"items": {
221
-
"type": "string"
222
-
},
223
-
"default": []
224
-
},
225
-
{
226
-
"type": "string",
227
-
"description": "Stringified version of command line arguments passed to the program.",
228
-
"default": ""
229
-
}
230
-
]
207
+
"type": "string",
208
+
"description": "The arguments to pass to the command to open the browser. This is used only if the platform-specific element (`osx`, `linux` or `windows`) doesn't specify a value for `args`. Use ${auto-detect-url} to automatically use the address the server is listening to.",
0 commit comments