Skip to content

Commit

Permalink
Indicate actual line num. for breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
haneefdm committed Sep 5, 2021
1 parent d0a7956 commit 2a4dc99
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/mi2/mi2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ export class MI2 extends EventEmitter implements IBackend {
}
else if (parseInt(match) !== 0) {
location += '-t -i ' + parseInt(match) + ' ';
}
}
}
}

Expand All @@ -411,6 +411,10 @@ export class MI2 extends EventEmitter implements IBackend {
this.sendCommand(`break-insert ${location}`).then((result) => {
if (result.resultRecords.resultClass === 'done') {
const bkptNum = parseInt(result.result('bkpt.number'));
if (breakpoint.line !== undefined) {
const line = result.result('bkpt.line');
breakpoint.line = line ? parseInt(line) : breakpoint.line;
}
breakpoint.number = bkptNum;

if (breakpoint.condition) {
Expand Down

0 comments on commit 2a4dc99

Please sign in to comment.