Skip to content

Commit 91bac73

Browse files
author
Tim Etchells
committed
Fix #48
1 parent 80ed5be commit 91bac73

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

dev/src/microclimate/connection/Connection.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { MCEndpoints, EndpointUtil } from "../../constants/Endpoints";
1717
import MCSocket from "./MCSocket";
1818
import ConnectionManager, { OnChangeCallbackArgs } from "./ConnectionManager";
1919
import Log from "../../Logger";
20-
import DebugUtils from "../project/DebugUtils";
2120
import Translator from "../../constants/strings/translator";
2221
import StringNamespaces from "../../constants/strings/StringNamespaces";
2322
import MCEnvironment from "./MCEnvironment";
@@ -56,7 +55,6 @@ export default class Connection implements vscode.QuickPickItem, vscode.Disposab
5655
this.label = Translator.t(StringNamespaces.TREEVIEW, "connectionLabel", { uri: this.mcUri });
5756
// this.description = this.workspacePath.fsPath.toString();
5857
Log.i(`Created new Connection @ ${this}, workspace ${this.workspacePath}`);
59-
DebugUtils.cleanDebugLaunchConfigsFor(this);
6058
}
6159

6260
public async dispose(): Promise<void> {

dev/src/microclimate/project/DebugUtils.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -118,27 +118,27 @@ export default class DebugUtils {
118118
}
119119
}
120120

121-
public static async cleanDebugLaunchConfigsFor(connection: Connection): Promise<void> {
122-
Log.d("Clean launch configs from " + connection.workspacePath);
123-
124-
// The potential names of the projects' debug configurations, whether or not they exist
125-
const projectDebugNames: string[] = connection.projects.map( (project) => this.getDebugName(project));
126-
127-
const workspaceConfig = this.getWorkspaceConfigFor(connection);
128-
const launchConfigs = this.getLaunchConfigurationsFrom(workspaceConfig);
129-
130-
// Loop backwards so we can remove elements
131-
for (let i = launchConfigs.length - 1; i >= 0; i--) {
132-
const existingLaunch: vscode.DebugConfiguration = launchConfigs[i];
133-
if (!projectDebugNames.includes(existingLaunch.name)) {
134-
// This launch config does not map to an existing project, so we delete it.
135-
Log.i(`Delete launch config: ${existingLaunch.name}`);
136-
launchConfigs.splice(i, 1);
137-
}
138-
}
139-
140-
await this.updateWorkspaceLaunchConfigs(workspaceConfig, launchConfigs);
141-
}
121+
// public static async cleanDebugLaunchConfigsFor(connection: Connection): Promise<void> {
122+
// Log.d("Clean launch configs from " + connection.workspacePath);
123+
124+
// // The potential names of the projects' debug configurations, whether or not they exist
125+
// const projectDebugNames: string[] = connection.projects.map( (project) => this.getDebugName(project));
126+
127+
// const workspaceConfig = this.getWorkspaceConfigFor(connection);
128+
// const launchConfigs = this.getLaunchConfigurationsFrom(workspaceConfig);
129+
130+
// // Loop backwards so we can remove elements
131+
// for (let i = launchConfigs.length - 1; i >= 0; i--) {
132+
// const existingLaunch: vscode.DebugConfiguration = launchConfigs[i];
133+
// if (!projectDebugNames.includes(existingLaunch.name)) {
134+
// // This launch config does not map to an existing project, so we delete it.
135+
// Log.i(`Delete launch config: ${existingLaunch.name}`);
136+
// launchConfigs.splice(i, 1);
137+
// }
138+
// }
139+
140+
// await this.updateWorkspaceLaunchConfigs(workspaceConfig, launchConfigs);
141+
// }
142142

143143
// keys for launch.json
144144
private static readonly LAUNCH: string = "launch"; // non-nls

0 commit comments

Comments
 (0)