use of com.nextgenactionscript.vscode.debug.responses.ScopesResponseBody in project vscode-nextgenas by BowlerHatLLC.
the class SWFDebugSession method scopes.
public void scopes(Response response, ScopesRequest.ScopesArguments arguments) {
List<Scope> scopes = new ArrayList<>();
int frameId = arguments.frameId;
try {
Frame[] swfFrames = swfSession.getFrames();
if (frameId >= 0 && frameId < swfFrames.length) {
Scope localScope = new Scope();
localScope.name = "Locals";
//this is a hacky way to store the frameId
localScope.variablesReference = frameId * 10 + LOCAL_VARIABLES_REFERENCE;
scopes.add(localScope);
}
} catch (PlayerDebugException e) {
//ignore and return no scopes
}
sendResponse(response, new ScopesResponseBody(scopes));
}
Aggregations