如何在maven下调试Flex应用程序 [英] How to debug Flex application under maven
问题描述
有没有人可以分享一些想法如何设置强大的调试环境?
我使用Maven&来自命令行的Flexmojos和Eclipse中的Flash Builder 4插件。在我的项目中,我也有一个Java / BlazeDS后端,我喜欢在Flex客户端的同时进行调试。
这是我做的:
1)我用货来启动我的Java后端的实例,它没有SWF或HTML包装器。 2)我创建了一个Web应用程序调试启动配置,其中启动URL只是指向一个文件(例如/ path / to / my / flash- builder / bin / myapp-wrapper.html)。 3)当我从Eclipse中启动这个调试配置时,Flex调试器就可以工作了。一旦停止点,它将打开Flex Debugger透视图。
通过直接从Eclipse启动调试配置,我不必重新构建并重新部署WAR文件每次更改为Flex应用程序后。事实上,在关闭Flex客户端之后,我只是离开Java服务器运行并重新连接下一个调试启动。
为了调试Java端,我启动应用程序服务器与JVM调试器命令行参数并启动远程Java调试器调试启动配置。 Eclipse在同一时间运行两个调试器都没有问题。
当我需要从http:// URL运行Flex Web应用程序时,会出现此设置的唯一问题(例如,获取flashvars检索URL查询参数)。在这种情况下,它是一个漫长的往返,以获得maven创建WAR并部署它,然后在每个Flex客户端源编辑之后启动调试器。我发布了一个关于如何使这种情况更好的问题(http://stackoverflow.com/questions/4426053/quickly-debug-flex-java-web-application-from-eclipse)。
这是一个令我感兴趣的领域,所以让我知道你在寻找什么,我可以帮助更多。
I develop Flex-Java applications which is running under Apache Tomcat. I use Flex Builder plug-in for Eclipse as my IDE. My application consists of several libraries and modules. I manage all of them as a small maven (flex-mojos) projects.
Does anybody can share some ideas how to setup robust debuging enviroment?
I use Maven & Flexmojos from the command line and the Flash builder 4 plugin inside of Eclipse. In my project I also have a Java/BlazeDS backend I like to debug at the same time as the Flex client on occasion.
Here's what I do:
1) I used cargo to startup an instance of my Java backend that DOES NOT have the SWF or HTML wrapper in it.
2) I've created a "Web Application" debug launch configuration where the launch URL just points to a file (e.g. "/path/to/my/flash-builder/bin/myapp-wrapper.html").
3) When I launch this debug configuration from within Eclipse the Flex debugger Just Works. As soon as a stop point it opened the Flex Debugger perspective automatically opens.
By launching a debug configuration directly from Eclipse I don't have to rebuild and redeploy a WAR file after each change made to the Flex app. In fact, after I shut down the Flex client I just leave the Java server running and reconnect with the next debugging launch.
In order debug the Java side, I start the application server with the JVM debugger command line arguments and launch a Remote Java Debugger debug launch configuration. Eclipse has no problem running both debuggers at the same time.
The only problem with this setup happens when I need to run the Flex web app from an http:// URL (for example to get flashvars to retrieve URL query parameters). In this case it is a long round-trip to get maven to created the WAR and deploy it, then to launch the debugger...after every Flex client source edit. I posted a question on how to make that case better (http://stackoverflow.com/questions/4426053/quickly-debug-flex-java-web-application-from-eclipse).
This is an area of interest to me so let me know what you are looking for and I can probably help more.
这篇关于如何在maven下调试Flex应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!