Implemented stepping back & changing variables

This commit is contained in:
WebFreak001 2016-07-10 16:34:12 +02:00
commit d704af2501
5 changed files with 39 additions and 14 deletions

View file

@ -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);