I installed flash player debugger and cannot able to debug the flash application.
And I got following message in console.
Waiting for Pla开发者_如何学编程yer to connect Failed to connect; session timed out. Ensure that: 1. you compiled your Flash movie with debugging on, and 2. you are running the Debugger version of the Flash Player.
Dont know how to fix.
If you are using chrome, the default flash player is not the debug version. After installing the Debug version of the player. you must disable the default version in Chrome.
Open Chrome Go to chrome://plugins
here you should see both versions of the shockwave player. Disable the first one or the one that is located here: C:\Users\your_username\AppData\Local\Google\Chrome\Application\22.0.1229.94\PepperFlash\pepflashplayer.dll
Now the debug version should be working in Chrome and should also work from Intellij if chrome is your default browser or set as the browser to open on debug.
Browser
Don't use Chrome to debug your SWF as it contains a non-debugger version of Flash Player. So after installing the Flash Player debugger, use Firefox, for example and make it as default browser.
SWF File
Be sure that you compiled your file as a debug version. To do that, have a look to your project structure. Then on your module and build configuration. In the compiler options, you should be able to check the "Generate debuggable SWF" option.
RUN/DEBUG Configuration
Check in the What to launch option, you selected your swf via HTML Wrapper. Check also that you selected the right Flex SDK in the options panel:
FINALLY
Launch your debug configuration. Intellij will build your project, create an HTML wrapper and launch it in the default browser (Firefox).
Your SWF should then be debuggable. If it still does not connect to the debugger in Intellij, right click in your flash application in Firefox and click Debugger
Based on the suggestion given by Timofei & bmleite, I fixed it.
When you debug pure SWF, make sure to check the default player is a debug player. Debug player has "Show Redraw Region" on right click.
IDEA generates html file that embeds swf file for users' convenience. If you open this html from file system, it allows you to debug SWF. If you put it (with the rest of files) to http server, then 'Debug' menu item is disabled in Chrome. In IE it works fine. This is obviously a Flash Player's bug.
精彩评论