Search code examples
javaapache-flexdebuggingstateful

Debug Java application with Flash Builder 4.6


I have a Flex application with Java server. I have some stateless and stateful Java beans. I want to debug Flex side with Flash Builder 4.6.

Every debugging launch, my Java JSESSIONID is regenerated so I can't reload properly my stateful bean. This behaviour appears when debugging with standalone player, or web based debugging inside FB 4.6.

When I launch directly my application outside FB in a browser, JSESSIONID isn't regenerated as it should be but I can't debug...

Is there a trick to debug with FB without JSESSIONID being regenerated?


Solution

  • I assume that the JSessionID relates to browser cookies which probably do not persist between browser sessions. So, if you can configure your browser not to launch a new session every time a new window or tab is open that may work.

    Other than that; you can hook up a Flash instance to a debugger session by right clicking on the Flash instance and selecting "Debugger". This answer tells you how to create the debug session w/o launching a browser instance.

    To quote the relevant pieces:

    you can modify the launch configuration to refer to any URL that doesn't contain a SWF; but I just wanted to add that you can also use the URL "about:blank", which has the advantage that (as of Flash Builder 4) Flash Builder won't even bother opening a browser page -- it will just start listening on the socket.

    I use this approach a lot for debugging mouse and keyboard events from another computer. One computer runs the app; and the other computer runs the debug session.