So when running a SWF, is there a way to step through line by line of ABC code and observe registers, stacks? Could I at least print it to screen or log it?
Asked
Active
Viewed 1,434 times
4
-
Any tool, also any approach with other programming languages, whatever. – Ska Mar 24 '11 at 16:20
-
if you have source files it's possible to place breakpoints on every line in FlashDevelop – www0z0k Mar 24 '11 at 16:53
-
Source of what? AS? Of course I have that, but I was thinking of having something that would show me the value of registers and stacks in AVM2 while ABC executes. – Ska Mar 24 '11 at 17:01
-
in flashdevelop you can see values of vars in your code and functions call stack, not the bytecode itself – www0z0k Mar 24 '11 at 17:18
-
I know, so you can in Flash Builder too. I'm interested in seeing registers, Operand Stack and Scope Stack which is how AVM2 works on the bytecode level. – Ska Mar 24 '11 at 18:33
2 Answers
2
What you want can be done by setting TraceOutputBuffered and AS3Verbose variables in your mm.cfg file to 1 as detailed in this post http://jpauclair.net/mm-cfg-secrets/
I have been able to verify that it works for flash player debug 10.0 r45_2, but it doesn't seem to output anything for 10.1 or 10.2.
jbalsas
- 3,484
- 22
- 25
-
1
-
You're right, I also can't make it work with 10.1.85. Also Yogda that I mentioned is Windows only for now, so no luck here :( – Ska Apr 01 '11 at 13:41
1
You can use SWFWire Inspector which emulates stepping through the code to do decompilation. If you check "ByteCode" and "Stack", you will see the byte code, and how the stack was affected afterwards (or how the decompiler thinks it would have been).
I also want to point out that flash player will dump the stack to the trace if you put an invalid opcode in your code.
Sean Fujiwara
- 4,506
- 22
- 34
-
I realized that, but only if there's an error. I will actually need to see what's the positive sequence. I have the SWFWire Inspector, I didn't know it can do that. – Ska Apr 04 '11 at 18:24