Skip to content

Commit 05499b9

Browse files
oltolmWebFreak001
authored andcommitted
fix problems found in review
1 parent daadc3a commit 05499b9

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/backend/mi2/mi2.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export class MI2 extends EventEmitter implements IBackend {
315315
}
316316

317317
onOutputStderr(str: string) {
318-
let lines = str.split('\n');
318+
const lines = str.split('\n');
319319
lines.forEach(line => {
320320
this.log("stderr", line);
321321
});
@@ -330,7 +330,7 @@ export class MI2 extends EventEmitter implements IBackend {
330330
}
331331

332332
onOutput(str: string) {
333-
let lines = str.split('\n');
333+
const lines = str.split('\n');
334334
lines.forEach(line => {
335335
if (couldBeOutput(line)) {
336336
if (!gdbMatch.exec(line))
@@ -835,7 +835,7 @@ export class MI2 extends EventEmitter implements IBackend {
835835
this.log("stderr", "varCreate");
836836
let miCommand = "var-create ";
837837
if (threadId != 0) {
838-
miCommand += `--thread ${threadId} --frame ${frameLevel}`
838+
miCommand += `--thread ${threadId} --frame ${frameLevel}`;
839839
}
840840
const res = await this.sendCommand(`${miCommand} ${this.quote(name)} ${frame} "${expression}"`);
841841
return new VariableObject(res.result(""));

src/mibase.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ export class MI2DebugSession extends DebugSession {
285285
this.sendResponse(response);
286286
}).catch((error: MIError) => {
287287
if (error.message === 'Selected thread is running.') {
288-
console.error(error);
288+
console.error(error.message);
289+
this.sendResponse(response);
289290
return;
290291
}
291292
this.sendErrorResponse(response, 17, `Could not get threads: ${error}`);

0 commit comments

Comments
 (0)