Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ: How do I debug a Maven-GWT project?

I'm using IntelliJ IDEA 8.1.2 on Win XP. I have a Maven 3.0.3 project, using the GWT 2.4 plugin. It is configured below ...

        <!-- GWT Maven Plugin -->
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>gwt-maven-plugin</artifactId>
            <version>${gwtVersion}</version>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>test</goal>
                        <!-- <goal>i18n</goal> <goal>generateAsync</goal> -->
                    </goals>
                </execution>
            </executions>
            <!-- Plugin configuration. There are many available options, see gwt-maven-plugin 
                documentation at codehaus.org -->
            <configuration>
                <runTarget>index.html</runTarget>
                <hostedWebapp>${webappDirectory}</hostedWebapp>
                <i18nMessagesBundle>com.cme.clearing.product.client.Messages</i18nMessagesBundle>
            </configuration>
        </plugin>

In IntelliJ, how do I run and debug this project? The only relevant link that Google recommends -- http://antonkirillov.wordpress.com/2011/03/22/creating-and-running-gwt-project-using-maven-and-intellij-idea-10/, is blocked by our company firewall.

If it is of any use, I have Tomcat 6.0.33 also installed locally.

Thanks, - Dave

like image 420
Dave Avatar asked Nov 15 '11 17:11

Dave


2 Answers

@Vijay Krishna this doesn't work for me, my solution was.

  1. First, create a mvn gwt:debug. When you run maven will start your application, and listen to port 8000(click on debug icon).
  2. Second, Create a Remote configuration to connect port 8000.

enter image description here

like image 165
Bernardo Vale Avatar answered Oct 02 '22 01:10

Bernardo Vale


So far the only way i found is to create 2 run configurations.

  • One configuration : Run maven command : mvn gwt:run
  • Second Configuration : Remote debug : specify localhost and 8000 port.

Now do :

  • Start the first run configurations. Your jetty server will start and says listening to 8000 port.
  • Then Start remote debug configuration to listen to that port.
  • Now put any break point in the code and debugger should hit it.

So far this is the only way worked for me. Evn im looking for one click option :)

like image 25
Vijay Krishna Avatar answered Oct 02 '22 01:10

Vijay Krishna