If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : We have got a new blog where we post some interesting SWF internals info.
![List of issues](/flash/images/issue_list.png)
#2131 ActionScript Debugger
Author:
Toonz
![user user](/flash/images/user.png)
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: Debugger
State: upgraded ![Help](/flash/images/help.png)
![Help](/flash/images/help.png)
I have spend like 3 - 4 hour trying to figure out how to do the "Change variable values on
runtime" thing.
I can't get the debugger to open, or see where the console would be to change the values.
I need like a guide on how to open the debugger or how I can change variable values on
runtime.
Thanks... My brain is a Smoothie now :)
Ad "I can't get the debugger to open"
What steps did you do?
You need
1) Download project content debugger and set its path (2) in Advanced Settings
2) Add some breakpoints
3) Press Debug menu item on top bar (Ctrl+F5)
4) Wait while FFDec injects debug info
5) Wait till content debugger loads
6) If it's AS1/2 - a window with connection info will popup - make sure you did not click
elsewhere or it will be in background - you must click OK in that window.
7) If it's AS3 then in the status bar there will be info that execution is halted to set
breakpoints - you can continue by pressing Continue in top bar (F5).
8) The execution should stop on desired breakpoint. If it's AS1/2 it may have problem
stopping when it's single frame SWF.
9) On a breakpoint, there is debug panel visible, where you can view all the local
variables.
10) To change variable value, double click the value, overwrite the value with new value
and hit ENTER.
Which step did you miss?
State: new→opened
I did download the Debugger and set its path.
I added some breakpoints.
Then I press the Debug button.
(1st Pic)
Waited for it to load.
(2nd Pic)
This pop-up comes. I clicked Connect.
(3rd Pic)
The game load.
I play and all good. The Debug Panel is visible, but no place to change any variables.
The game goes through those breakpoint, but the debugger don't do anything.
(4th Pic)
Also, is there any console. Like in the browser, there is a console where you can write
code and it will run it in real-time.
Like: if I type "console.log(_root.Shop.Cash);" it will output the value of the variable.
It seems that some error occured - I see the red icon in the bottom right corner.
Can you click it and copy paste the error here?
Also, if the debugger does not stop on the breakpoint,
then I will need the sample SWF file to investigate it.
I can make this issue private if you do not want to publish the SWF file for everybody.
Here is the error. While redoing that to get the error again, I notice this comes when I
close the game. And not when I open the Debugger. But still no breakpoint.
"""
23/11/2023 17:25:59 SEVERE null
java.util.concurrent.CancellationException
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:121)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.jpexs.helpers.CancellableWorker.get(CancellableWorker.java:132)
at com.jpexs.helpers.CancellableWorker.call(CancellableWorker.java:157)
at
com.jpexs.decompiler.flash.action.ActionListReader.readActionListTimeout(ActionListReader.
java:78)
at com.jpexs.decompiler.flash.SWF.getCachedActionList(SWF.java:3382)
at
com.jpexs.decompiler.flash.types.BUTTONCONDACTION.getActions(BUTTONCONDACTION.java:237)
at
com.jpexs.decompiler.flash.gui.action.ActionPanel$4.doInBackground(ActionPanel.java:542)
at
com.jpexs.decompiler.flash.gui.action.ActionPanel$4.doInBackground(ActionPanel.java:527)
at com.jpexs.helpers.CancellableWorker$1.call(CancellableWorker.java:61)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at com.jpexs.helpers.CancellableWorker.run(CancellableWorker.java:78)
at
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1623)
"""
And it's a old public game "Dress up with Jill" so its fine you can have it public. Aslong
as I don't leak anything lol.
And the "Button 1822" is the shop button. I added the "_root.Shop.Cash = 10;" on line 3
myself, its not in the game.
![Download](/flash/images/disk.png)
Please try nightly 2714,
it should be fixed,
the player should properly stop on that breakpoint.
State: opened→upgraded
Type: question→bug
Type: question→bug
It works, we got a breakpoint. And I can change variable values.
Thank you. Lub U <3
I had a dumb question. Can you change the breakpoint after you start the debugger?
Then I checked that it can be done, but if there is not breakpoint and you press Continue
(F5). And then add a breakpoint, it will not stop at any breakpoint.
Like if I had a breakpoint on line 2 of the Shop button.
Start the Debugger, and press the shop button, it will stop at that breakpoint.
Then, while keeping that breakpoint. Put another breakpoint on line 2 of the Options
button. After, remove the breakpoint on the Shop button.
Then press Continue (F5).
Then, if I press the Shop button it will not stop. But if I press the Option button, it
will stop. Which it should do.
But, if I remove all the breakpoint. Then press Continue (F5). And then, add a breakpoint
anywhere. It will not stop, it will ignore all breakpoint.
Then, I would need to stop the debugger and run it again. And if I remove all breakpoints
it will do that again.
![Download](/flash/images/disk.png)
Please try nightly 2715,
adding breakpoints while SWF is running should be working now.
Love you, Thank you <3
This is less of a bug, and more of a suggestion.
- Have a clear all breakpoint button.
- Be able search thought the name of the big list of variables in the debugger.
Again, thanks alot <3
In nightly 2718, there is "view list of breakpoints" button, on the top of actionscript
panel, which shows you a dialog with list of all breakpoints in the SWF file. There is
also "Remove all" button in that dialog.
To the search variables:
The list of variables is in the tree structure, which is loaded on demand as you expand
its nodes. It is also not quaranteed that the tree is finite as some nodes may recursively
contain self parents.
So if I want to search variable "xxx", I cannot expand all levels to search it in,
so only currently visible levels + 1 could be searched.
I am not sure this will be very useful...
Also: If you want to request more new features and/or report bugs,
please create new issue for each of them. I don't want to continually work on single long
issue,
it could be a big mess then. Keeping issues separate helps me stay organized.