简体   繁体   English

Flash Builder 4.7中Flex / Java应用程序的远程调试Java部分

[英]Remote Debug Java part of the Flex/Java application within Flash Builder 4.7

I have a Flex/Java application. 我有一个Flex / Java应用程序。 The build is done using Maven. 使用Maven完成构建。 My IDE is Flash Builder 4.7. 我的IDE是Flash Builder 4.7。 The server is a tomcat wrapper (vFabric tcserver). 该服务器是tomcat包装器(vFabric tcserver)。

Based upon the many google searches, I added the following lines in my wrapper.conf. 基于许多Google搜索,我在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. 在我的Flash Builder中,我设置了一个调试配置以在主机localhost上使用端口8000,并且连接类型为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. 我正在使用Internet Explorer进行调试,并且确实具有Flash Player的调试版本,这已由某些Flash Player调试器网站确认。

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). 当我尝试调试时,tomcat日志显示它正在侦听端口8000。netstat显示tcp 0.0.0.0:8000已建立(调试未进行时它将侦听)。 Within Flash Builder, in the debug perspective, it shows that it is using port 8000. 在Flash Builder的调试透视图中,它表明它正在使用端口8000。

The problem that I am having is, I have set breakpoints in both the Flex part and the Java part of the application. 我遇到的问题是,我在应用程序的Flex部分和Java部分都设置了断点。 The breakpoints in the Flex get right into the Debug mode without any problem. Flex中的断点可以毫无问题地进入调试模式。 However, the breakpoints in the Java part don't break at all. 但是,Java部分中的断点根本不会中断。

What am I missing here? 我在这里想念什么? Any other modifications that I need to make in order to debug the Java part of the application? 为了调试应用程序的Java部分,我需要进行其他修改吗?

The application was created using Flex SDK 4.5.1A. 该应用程序是使用Flex SDK 4.5.1A创建的。 When I tried to import the existing maven project, it said that I needed Flash Player 10.2. 当我尝试导入现有的maven项目时,它说我需要Flash Player 10.2。 The version of my Flash Player debugger is 10.2. 我的Flash Player调试器的版本是10.2。 I understand that the current version of Flash player is 11.x. 我了解Flash Player的当前版本是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? 如果我要将Flash Player调试器版本升级到11.x(无论当前版本是什么),我仍然可以调试Flex / Java应用程序吗?

Thanks to the comments from RIAStar! 感谢RIAStar的评论! I looked further into how to enable the tomcat debug mode. 我进一步研究了如何启用tomcat调试模式。 It turned out that I had to add the following line in my catalina.properties file. 原来,我必须在catalina.properties文件中添加以下行。

tomcat.enable.debug=true

That line did the magic! 那条线是神奇的!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM