use of com.nextgenactionscript.vscode.debug.responses.StackTraceResponseBody in project vscode-nextgenas by BowlerHatLLC.
the class SWFDebugSession method stackTrace.
public void stackTrace(Response response, StackTraceRequest.StackTraceArguments arguments) {
List<StackFrame> stackFrames = new ArrayList<>();
try {
Frame[] swfFrames = swfSession.getFrames();
for (int i = 0, count = swfFrames.length; i < count; i++) {
Frame swfFrame = swfFrames[i];
Location location = swfFrame.getLocation();
SourceFile file = location.getFile();
StackFrame stackFrame = new StackFrame();
stackFrame.id = i;
stackFrame.name = swfFrame.getCallSignature();
if (file != null) {
Source source = new Source();
source.name = file.getName();
source.path = transformPath(file.getFullPath());
stackFrame.source = source;
stackFrame.line = location.getLine();
stackFrame.column = 0;
}
stackFrames.add(stackFrame);
}
} catch (NotConnectedException e) {
//ignore
}
sendResponse(response, new StackTraceResponseBody(stackFrames));
}
Aggregations