Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging in Eclipse GWT

Since yesterday I've been working on an existing GWT project. My problem however is that I can't debug in Eclipse. It simply won't break in my breakpoints.

I've seen other people with the same issue:

  • GWT 2.0 Eclipse Breakpoint Not Working
  • Why when starting GWT in debug mode, my break points don't break
  • Why are my breakpoints ignored with GWT, Eclipse, and Java 1.6.0_14?
  • GWT SuperDevMode breakpoints not working

And I've also looked at some tutorials:

  • GWT development mode in Eclipse
  • GWT Debugging

I've tried all kind of different things based on these sites, but none of them seem to work. Some things I've tried:

  • using FireFox instead of Google Chrome
  • using jdk1.8.0_72 instead of jdk1.7.0_79
  • putting gwt-dev-2.7.0.jar at the top of my Classpath User Entries (instead of somewhere in the middle)
  • Adding any combination of the following Arguments: -bindAdres my.ip.adres; -gen my_path; -eclipse (-eclipse isn't a valid argument btw..).

My current configurations:

Main-tab:

Project:
    user-testwar
Main class:
    com.google.gwt.dev.DevMode

Arguments-tab:

Program arguments:
    -logLevel INFO
    -port 8888
    -war C:\Users\...\user-testwar\target\UserTestWar
    -superDevMode
    -remoteUI "${gwt_remote_ui_server_port}:${unique_id}"
    -codeServerPort 9997
    my.package.gwt.udf.viewer.TestWarProject
VM arguments:
    -Xmx512m

Classpath-tab:

Bootstrap Entries:
    JRE System Library [JavaSE-1.6]
User Entries:
    gwt-dev-2.7.0.jar
    java - \user-testwar\src\main\
    gwt - \user-testwar\target\generated-sources\
    java - \user-jar\src\main\
    gwt - \user-jar\target\generated-sources\
  > user-testwar (default classpath)
        user-testwar
        Maven Dependencies
        gwt-user.jar
        gwt-codeserver.jar
        gwt-dev.jar
        validation-api-1.0.0.GA-sources.jar
        validation-api-1.0.0.GA.jar

So, anyone has any (other) ideas to fix the debug issues with Eclipse and GWT?

EDIT:

When I put a breakpoint in our RemoteService implementation class it does break there. But the breakpoints of my widgets / pages in the user-jar project and in the main code of my user-testwar project (where I want to debug) are ignored..

like image 885
Kevin Cruijssen Avatar asked Feb 12 '16 09:02

Kevin Cruijssen


People also ask

How do I debug a program in GWT?

GWT - Debugging Application 1 Set break points in the code and see them in BreakPoint Explorer. 2 Step through the code line by line during debugging. 3 View the values of variable. 4 Inspect the values of all the variables. 5 Inspect the value of an expression. 6 Display the stack frame for suspended threads. More ...

How do I use GWT in Eclipse?

Using Eclipse GWT provides a set of tools that can simply be used with a text editor, the command line, and a browser. However, you may also use GWT with your favorite IDE. Google provides a plugin for Eclipse that makes development with GWT even easier.

How to debug Helloworld application in Eclipse?

Now click on Debug application menu and select HelloWorld application to debug the application. If everything is fine, you must see GWT Development Mode active in Eclipse containing a URL as shown below.

How do I debug a Java project in Eclipse?

The Eclipse Platform helps developers debug by providing buttons in the toolbar and key binding shortcuts to control program execution. For more information about debugging visit: Eclipse Stepping Commands Help This section will give you more advanced tips and tricks to help you debug your Java project.


1 Answers

If you want to debug your GWT application in Eclipse and you are using SDM, you need the SBDG plugin.

The SDBG-plugin can be downloaded here: https://sdbg.github.io/

Otherwise, when using SDM, you have to debug in the browser.

Another solution is to use Intellij Ultimate edition, which offers a JavaScript debugger. You need the Ultimate edition in Fact that the GWT facet is not part of the Community edition.

Update:

Starting with version 3.0 of the GWT Eclipse plugin, the SBDG-Plugin is integrated into the GWT plugin and makes it quite easy to debug a GWT application.

like image 87
El Hoss Avatar answered Sep 30 '22 15:09

El Hoss