Fixed AS3 Debugging P-code inside nested functions

Fixed AS3 Debugging - show (and click through) proper call stack
This commit is contained in:
Jindra Petřík
2023-11-05 17:17:00 +01:00
parent 0f0e6d880d
commit 8b3b740b44
6 changed files with 51 additions and 16 deletions

View File

@@ -2542,16 +2542,17 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
public void run() {
if (Main.isDebugPCode()) {
if (classIndex != -1) {
boolean classChanged = false;
if (abcPanel.decompiledTextArea.getClassIndex() != classIndex) {
abcPanel.decompiledTextArea.setClassIndex(classIndex);
classChanged = true;
}
if (traitIndex != -10 && (classChanged || abcPanel.decompiledTextArea.lastTraitIndex != traitIndex)) {
abcPanel.decompiledTextArea.gotoTrait(traitIndex);
}
}
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.gotoInstrLine(line);
abcPanel.decompiledTextArea.gotoMethod(methodIndex, new Runnable() {
@Override
public void run() {
abcPanel.detailPanel.methodTraitPanel.methodCodePanel.gotoInstrLine(line);
}
});
} else {
abcPanel.decompiledTextArea.gotoLine(line);
}