If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : You can now close your own issues and reopen them later if needed. You can also comment closed issues.
List of issues#2619 How do I debug an SWF game that is only available for a web browser?
Author:
Antonio225
Antonio225Date created:
Type: feature
Visibility: Everybody
Assigned to:
State: upgraded 

So I have an SWF game and I have a server locally where the game gets the assets from
there.
Is there a way for me to perform some debugging like setting breakpoints, looking at the
traces and looking at the memory?
I'm currently doing debugging by adding lines of codes like "console.log("Test: ",param1)"
in P-Code and... Please tell me there is a better way to perform debugging on SWF files
this way.
Thanks in advance. Btw I have the "flashplayer_32_ppapi_debug.exe" installed.
I tried using Apache's Flex FDB but it's kinda hard to use and I don't understand how to
add breakpoints, I can't add breakpoints like "(fdb) b Player::joinGame", basically if I
have FFDec open I can't copy the function names from there... Am I doing something wrong?
Currently, you cannot do it in FFDec.
It is mentioned as feature request couple of times,
so maybe I will implement it in the future...
State: new→opened
Please try nightly 3413, there is new option "Debug listen..." in the toolbar.
If you press it, it shows you some info how it works first.
Before you debug files in the browser,
they need to be instrumented - prepared for debugging.
You can do it in FFDec by rightclick context menu on SWF - "Prepare file or debugging"
- you either select other file name, or press OK to overwrite existing file.
(The dialog about "file changed" may appear, which you confirm)
After you prepared the files, make sure your webbrowser will use them. (For AS1/2 files,
also SWD file is needed)
Then press "Debug listen..."
and after while you will see in the status bar that it's "Listening for incoming
connections...".
Then you open the page with the browser and flash debug plugin should connect to FFDec.
If it's AS3 file then the debugging will be paused at start, allowing you to add
breakpoints.
You add them in the AS source code by clicking left to the line number.
Then you press F5 and the execution will pause again when it reaches the desired break
points.
For AS1/2 files, breakpoints are saved when you press "Prepare file for debugging".
Howewer, breakpoints can be added anytime while running.
I may create a video for it later...
Let me know whether it works for you.
One note: For AS3 files, the preparation adds FFDecs helper package to the SWF for better
injecting debug info.
State: opened→upgraded
Type: question→feature
Type: question→feature
A video would be interesting, it may just be me but I feel FFDec's debugging capabilities
are underappreciated due to the complexity in setting it up.
See my youtube channel, I added a video about debugging in the browser, how to download
the player, and also how to debug without browser.
https://www.youtube.com/playlist?list=PL1yjDdXgDzcAYUjW5LTs3pmKuYV53Ir0s
