问题
I have a Flex/Java application. The build is done using Maven. My IDE is Flash Builder 4.7. The server is a tomcat wrapper (vFabric tcserver).
Based upon the many google searches, I added the following lines in my wrapper.conf.
wrapper.java.additional.11="-Xdebug"
wrapper.java.additional.12="-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
In my Flash Builder, I have set up a debug configuration to use port 8000 on host localhost and the connection type is Socket Attach. I am using Internet Explorer to do the debugging and I DO have the debug version of the Flash player as confirmed by some Flash player debugger web site.
When I try to debug, the tomcat log shows that it is listening on port 8000. netstat shows that tcp 0.0.0.0:8000 is established (it would be listening when the debug is not in progress). Within Flash Builder, in the debug perspective, it shows that it is using port 8000.
The problem that I am having is, I have set breakpoints in both the Flex part and the Java part of the application. The breakpoints in the Flex get right into the Debug mode without any problem. However, the breakpoints in the Java part don't break at all.
What am I missing here? Any other modifications that I need to make in order to debug the Java part of the application?
The application was created using Flex SDK 4.5.1A. When I tried to import the existing maven project, it said that I needed Flash Player 10.2. The version of my Flash Player debugger is 10.2. I understand that the current version of Flash player is 11.x. If I were to upgrade my Flash player debugger version to 11.x (whatever the current version is), would I still be able to debug the Flex/Java application?
回答1:
Thanks to the comments from RIAStar! I looked further into how to enable the tomcat debug mode. It turned out that I had to add the following line in my catalina.properties file.
tomcat.enable.debug=true
That line did the magic!
来源:https://stackoverflow.com/questions/21262292/remote-debug-java-part-of-the-flex-java-application-within-flash-builder-4-7