maven下如何调试Flex应用程序 [英] How to debug Flex application under maven

查看:34
本文介绍了maven下如何调试Flex应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了在 Apache Tomcat 下运行的 Flex-Java 应用程序.我使用 Eclipse 的 Flex Builder 插件作为我的 IDE.我的应用程序由几个库和模块组成.我将它们全部作为一个小型 maven (flex-mojos) 项目进行管理.

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?

推荐答案

我使用 Maven &来自命令行的 Flexmojos 和 Eclipse 中的 Flash builder 4 插件.在我的项目中,我也有一个 Java/BlazeDS 后端,我喜欢在调试 Flex 客户端的同时进行调试.

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.

这就是我所做的:

1) 我使用cargo 来启动我的Java 后端实例,其中没有SWF 或HTML 包装器.

1) I used cargo to startup an instance of my Java backend that DOES NOT have the SWF or HTML wrapper in it.

2) 我创建了一个Web 应用程序"调试启动配置,其中启动 URL 仅指向一个文件(例如/path/to/my/flash-builder/bin/myapp-wrapper.html").

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) 当我从 Eclipse 中启动这个调试配置时,Flex 调试器就正常工作了.只要它打开一个停止点,Flex Debugger 透视图就会自动打开.

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.

通过直接从 Eclipse 启动调试配置,我不必在对 Flex 应用程序进行每次更改后重建和重新部署 WAR 文件.事实上,在我关闭 Flex 客户端后,我只是让 Java 服务器运行并在下一次调试启动时重新连接.

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.

为了调试 Java 端,我使用 JVM 调试器命令行参数启动应用服务器并启动远程 Java 调试器调试启动配置.Eclipse 同时运行两个调试器没有问题.

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.

当我需要从 http://URL 运行 Flex Web 应用程序(例如获取 flashvars 以检索 URL 查询参数)时,会发生此设置的唯一问题.在这种情况下,让 maven 创建 WAR 并部署它,然后启动调试器......在每次 Flex 客户端源代码编辑之后,这是一个漫长的往返旅程.我发布了一个关于如何改善这种情况的问题(http://stackoverflow.com/questions/4426053/quickly-debug-flex-java-web-application-from-eclipse).

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆