Implemented stepping back & changing variables
This commit is contained in:
parent
81f8e6fcf1
commit
d704af2501
5 changed files with 39 additions and 14 deletions
|
|
@ -81,6 +81,17 @@ export class MI2DebugSession extends DebugSession {
|
|||
this.sendResponse(response);
|
||||
}
|
||||
|
||||
protected setVariableRequest(response: DebugProtocol.SetVariableResponse, args: DebugProtocol.SetVariableArguments): void {
|
||||
this.miDebugger.changeVariable(args.name, args.value).then(() => {
|
||||
response.body = {
|
||||
value: args.value
|
||||
};
|
||||
this.sendResponse(response);
|
||||
}, err => {
|
||||
this.sendErrorResponse(response, 11, `Could not continue: ${err}`);
|
||||
});
|
||||
}
|
||||
|
||||
protected setFunctionBreakPointsRequest(response: DebugProtocol.SetFunctionBreakpointsResponse, args: DebugProtocol.SetFunctionBreakpointsArguments): void {
|
||||
let cb = (() => {
|
||||
this.debugReady = true;
|
||||
|
|
@ -290,6 +301,14 @@ export class MI2DebugSession extends DebugSession {
|
|||
});
|
||||
}
|
||||
|
||||
protected stepBackRequest(response: DebugProtocol.StepBackResponse, args: DebugProtocol.StepBackArguments): void {
|
||||
this.miDebugger.step(true).then(done => {
|
||||
this.sendResponse(response);
|
||||
}, msg => {
|
||||
this.sendErrorResponse(response, 4, `Could not step back: ${msg} - Try running 'target record-full' before stepping back`);
|
||||
});
|
||||
}
|
||||
|
||||
protected stepInRequest(response: DebugProtocol.NextResponse, args: DebugProtocol.NextArguments): void {
|
||||
this.miDebugger.step().then(done => {
|
||||
this.sendResponse(response);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue