Offer launch.json generation from the startup project picker

The one-time prompt is easy to miss, so the picker now ends with the
same command, plus a solution picker.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169iPWwKHZoBTNN9qwXiwqk
This commit is contained in:
max
2026-09-08 13:13:29 +02:00
co-authored by Claude Fable 5.1
parent 3f67eef9aa
commit 3433162cf4
3 changed files with 28 additions and 12 deletions
+3 -2
View File
@@ -77,8 +77,9 @@ still runs after this one and fills in `justMyCode`, symbol options and the cons
### F5
The first time it sees a solution the extension offers to write a `launch.json` entry
(*.NET Solution: Create launch.json and tasks.json entries* does it later):
The first time it sees a solution the extension offers to write a `launch.json` entry.
Later, run *.NET Solution: Create launch.json and tasks.json entries* from the command
palette, or pick it at the bottom of the startup-project list (click the project name):
```jsonc
{
+24 -9
View File
@@ -23,17 +23,32 @@ async function pickStartupProject(): Promise<void> {
: 'No solution found in the workspace.');
return;
}
const picked = await vscode.window.showQuickPick(
candidates.map(project => ({
label: project.info.name,
description: vscode.workspace.asRelativePath(project.info.fsPath, false),
detail: project.info.platforms.length ? `Platforms: ${project.info.platforms.join(', ')}` : undefined,
picked: project === model.startupProject,
project,
})),
type Item = vscode.QuickPickItem & { project?: StartupProject; action?: () => Promise<void> };
const items: Item[] = candidates.map(project => ({
label: project.info.name,
description: vscode.workspace.asRelativePath(project.info.fsPath, false),
detail: project.info.platforms.length ? `Platforms: ${project.info.platforms.join(', ')}` : undefined,
picked: project === model.startupProject,
project,
}));
items.push(
{ label: '', kind: vscode.QuickPickItemKind.Separator },
{
label: '$(json) Create launch.json and tasks.json entries',
description: 'so F5 builds with the selected configuration',
action: generateLaunchConfig,
},
{
label: '$(file-submodule) Select solution',
description: model.allSolutions.length > 1 ? `${model.allSolutions.length} found` : undefined,
action: pickSolution,
});
const picked = await vscode.window.showQuickPick(items,
{ title: `${model.activeSolution?.name}: startup project`, matchOnDescription: true });
if (picked) {
if (picked?.project) {
await model.selectProject(picked.project);
} else if (picked?.action) {
await picked.action();
}
}
+1 -1
View File
@@ -72,7 +72,7 @@ export class StatusBar implements vscode.Disposable {
`**Solution:** \`${solution.name}\` (${vscode.workspace.asRelativePath(solution.fsPath, false)})`,
this.busy ? `\n$(loading~spin) ${this.busy}` : '',
'',
'Click to change the startup project.',
'Click to change the startup project, or to create the launch.json / tasks.json entries.',
].join(' \n'));
const mapped = `${active.projectConfiguration}|${active.projectPlatform}`;