Skip to content
Permalink
Browse files
updated code to make dapodilDebugVerion the latest version if it was …
…not set. doing this allowed for certain error handling code to be deleted
  • Loading branch information
dells-ctc committed Jun 1, 2021
1 parent 42c770a commit 1ceedff013e24626f9ba0c6cc39c670714ab5a5a
Showing 1 changed file with 2 additions and 11 deletions.
@@ -39,13 +39,9 @@ export async function getDebugVersion(config: vscode.DebugConfiguration) {
request.result.forEach(r => { if (r.name != "v0.0.0") releases.push(r.name); });

let dapodilDebugVersion = await vscode.window.showQuickPick(releases);

if (!dapodilDebugVersion) {
const err: Error = new Error(`Dapodil Debugger Version is not set or bad version entered.`);
throw err;
}

dapodilDebugVersion = dapodilDebugVersion ? dapodilDebugVersion : releases[0] // If dapodilDebugVersion is null use latest version
dapodilDebugVersion = dapodilDebugVersion?.includes("v") ? dapodilDebugVersion : `v${dapodilDebugVersion}`;

return dapodilDebugVersion
}

@@ -59,11 +55,6 @@ export async function getDebugger(config: vscode.DebugConfiguration) {
if (!config.useExistingServer) {
let dapodilDebugVersion = await getDebugVersion(config);

if (!dapodilDebugVersion) {
const err: Error = new Error(`Dapodil Debugger Version is not set or bad version entered.`);
throw err;
}

const delay = ms => new Promise(res => setTimeout(res, ms));

if(vscode.workspace.workspaceFolders !== undefined) {

0 comments on commit 1ceedff

Please sign in to comment.