tags:

views:

82

answers:

2

I'm currently writing a GWT application through Eclipse. Eclipse is used for development but I use the m2eclipse plugin and a Maven pom.xml with the GWT plugin to build & run it.

When I need to debug the app I must:

  1. Invoke "Run As ..." on a Maven project (via m2eclipse) "war:exploded gwt:debug". This launches GWT's app server and waits for a remote debug connection on port 3408. The need to wait for the WAR to be exploded means it could be a minute for this to happen.
  2. Invoke "Debug As..." a Remote Java Application to connect to the server.

I've already added both targets to favourites to lock them into the drop down but it's still a pain.

I'd like to launch them both in sequence from a single click rather than two discrete actions.

Is there any way in Eclipse to achieve this?

A: 

Why are you launching like this? Can't you just launch it by GWT plugin? Go to Run Configurations -> Web Application (the blue circle with "g" inside) and create new Run Configuration.

In it, in Main tab, enter (or select) your project, and enter com.google.gwt.dev.DevMode in Main class.

In Arguments enter -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -port 8888 -war path_to_your_dir_with_WEB-INF_directory com.package.your.Module

amorfis
I don't have a choice in the matter. Our project is extremely large, has a lot of dependencies, pulls in some J2EE and we use Maven to build and manage it. The plugin is okay for smallish projects but not suitable for us.
locka
If so, I'm afraid it is not possible to launch two debug sessions with one click. AFAIK you can make GWT run on external server, maybe this is a solution, but I don't know how to do it.
amorfis
+2  A: 

Try this plugin. http://marketplace.eclipse.org/content/escripts

You can define scripts of Eclipse actions easily. You create a script of starting the 2 debug session, then run with one click or shortcut.

Gábor Lipták