Skip to content

Commit c5b2e1a

Browse files
authored
fix(vscode): Create Unique Configuration Names (#6657)
Fixed nuget launching by adding unique logic app name to end of the configuration name in launch.json
1 parent 70e754b commit c5b2e1a

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

apps/vs-code-designer/src/app/commands/createNewCodeProject/createCodeProjectSteps/createLogicApp/initLogicAppCodeProjectVScode/InitCodeProject.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ export abstract class InitCodeProject extends AzureWizardExecuteStep<IProjectWiz
6464
protected getTaskInputs?(): ITaskInputs[];
6565
protected getWorkspaceSettings?(): ISettingToAdd[];
6666

67-
protected getDebugConfiguration(version: FuncVersion): DebugConfiguration {
67+
protected getDebugConfiguration(version: FuncVersion, logicAppName: string): DebugConfiguration {
6868
return {
69-
name: localize('attachToNetFunc', 'Attach to logic app'),
69+
name: localize('attachToNetFunc', `Attach to logic app ${logicAppName}`),
7070
type: version === FuncVersion.v1 ? 'clr' : 'coreclr',
7171
request: 'attach',
7272
processId: `\${command:${extensionCommand.pickProcess}}`,
@@ -95,7 +95,7 @@ export abstract class InitCodeProject extends AzureWizardExecuteStep<IProjectWiz
9595

9696
// Write the necessary Visual Studio Code configuration files.
9797
await this.writeTasksJson(context, vscodePath);
98-
await this.writeLaunchJson(context, context.workspaceFolder, vscodePath, version);
98+
await this.writeLaunchJson(context, context.workspaceFolder, vscodePath, version, context.logicAppName || context.workspaceFolder.name);
9999
await this.writeSettingsJson(context, vscodePath, language, version);
100100
await this.writeExtensionsJson(context, vscodePath, language);
101101

@@ -260,10 +260,11 @@ export abstract class InitCodeProject extends AzureWizardExecuteStep<IProjectWiz
260260
context: IActionContext,
261261
folder: WorkspaceFolder | undefined,
262262
vscodePath: string,
263-
version: FuncVersion
263+
version: FuncVersion,
264+
logicAppName: string
264265
): Promise<void> {
265266
if (this.getDebugConfiguration) {
266-
const newDebugConfig: DebugConfiguration = this.getDebugConfiguration(version);
267+
const newDebugConfig: DebugConfiguration = this.getDebugConfiguration(version, logicAppName);
267268
const versionMismatchError: Error = new Error(
268269
localize(
269270
'versionMismatchError',

apps/vs-code-designer/src/app/commands/initProjectForVSCode/InitVSCodeStepBase.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ export abstract class InitVSCodeStepBase extends AzureWizardExecuteStep<IProject
5959
protected getTaskInputs?(): ITaskInputs[];
6060
protected getWorkspaceSettings?(): ISettingToAdd[];
6161

62-
protected getDebugConfiguration(version: FuncVersion): DebugConfiguration {
62+
protected getDebugConfiguration(version: FuncVersion, logicAppName: string): DebugConfiguration {
6363
return {
64-
name: localize('attachToNetFunc', 'Run/Debug logic app'),
64+
name: localize('attachToNetFunc', `Run/Debug logic app ${logicAppName}`),
6565
type: version === FuncVersion.v1 ? 'clr' : 'coreclr',
6666
request: 'attach',
6767
processId: `\${command:${extensionCommand.pickProcess}}`,
@@ -84,7 +84,7 @@ export abstract class InitVSCodeStepBase extends AzureWizardExecuteStep<IProject
8484
const vscodePath: string = path.join(context.projectPath, vscodeFolderName);
8585
await fse.ensureDir(vscodePath);
8686
await this.writeTasksJson(context, vscodePath);
87-
await this.writeLaunchJson(context, context.workspaceFolder, vscodePath, version);
87+
await this.writeLaunchJson(context, context.workspaceFolder, vscodePath, version, context.logicAppName || context.workspaceFolder.name);
8888
await this.writeSettingsJson(context, vscodePath, language, version);
8989
await this.writeExtensionsJson(context, vscodePath, language);
9090

@@ -211,10 +211,11 @@ export abstract class InitVSCodeStepBase extends AzureWizardExecuteStep<IProject
211211
context: IActionContext,
212212
folder: WorkspaceFolder | undefined,
213213
vscodePath: string,
214-
version: FuncVersion
214+
version: FuncVersion,
215+
logicAppName: string
215216
): Promise<void> {
216217
if (this.getDebugConfiguration) {
217-
const newDebugConfig: DebugConfiguration = this.getDebugConfiguration(version);
218+
const newDebugConfig: DebugConfiguration = this.getDebugConfiguration(version, logicAppName);
218219
const versionMismatchError: Error = new Error(
219220
localize(
220221
'versionMismatchError',

0 commit comments

Comments
 (0)