Cannot watch expressions of GWT under debug mode in Eclipse - eclipse

I am using GWT 2.8 with GWT plugin v.3 and Tomcat 8 in Eclipse.
When I debug the project, breakpoints are working fine, but I can't watch expression, it shows reference error.
Does anyone has the same issue?
I read some related question which says using Google Plugin will be fine, but Google Plugin doesn't support Java 8.
Why it happens and how I solve it?

With GWT 2.8 and SuperDev Mode you have to change your debugging habbits a bit. On the server side the things stay the same, but on the client side you have to use the browser for debugging. Use GWT.debugger to add breakpoints in the code or set JS breakpoints in your browsers developer tools.
You also have to use the developer tools to see the expressions. Keep in mind to turn on source maps in your browser preferences. Eventually you have to use the -noincremental parameter in your run configuration to see the java variables.

Related

How can I debug a GWT project in eclipse?

I have a GWT-Maven project and I want to debug it. I have not any Idea about debug in development mode or production mode. so I am giving some step which I did.
I deploy the war file on tomcat6 liferay server.
now I set a break point on server side(its work perfect)
when I set break point on client its not workig.
so is there is any way to debug GWT client on development or production mode.
I'm not sure if I'm following you correctly, but GWT is compiled into JS. Take a look at sourceMaps, I believe that's what you're looking for.
You should use the debugger of your browser. Chrome is best for this.
Launch your GWT app.
Press F12 to open developer tools.
Select "sources" tab
In the tree on the left open "Title of your page (xxxx.html)"
Below this you will see source maps with all your packages.
Open the java file you wish to put a breakpoint in and set a breakpoint using Chrome.
Doing client side GWT debugging in Eclipse is afaik not possible. But for me the Chrome debugger is more than enough.
I think IntelliJ can do client side debugging for GWT from whitin IntelliJ itself (for the paid version of IntelliJ).

Debug a remote JBoss's GWT App in Eclipse

It works to debug Java code running on a remote JBoss server on Linus, Eclipse runs on Windows. The code is can be traced with Eclipse's debugger and JDT. The ear is maven built.
Now I try to debug also the GWT Java code with Eclipse remote debug. Do I understand right, that this should be possible with com.google.gwt.dev.DevMode ? I do not want to use Superdev and Javascript, I very much prefer to debug Java in the Eclipse Debugger.
Has anybody tried this?
If you use GWT 2.7, the DevMode is deprecsted and should no longer be used.
The debug way is the SuperDev Mode, you debug with the browsers builtin javascript debugger and a sourcemap that translates to the cirrent java line. The jboss is out of scope here, because everything happens in your browser.
Excellent support for sourcemaps is in chrome.
I got it to work with the help of this: Is it possible to debug GWT client code on a REMOTE server using IntelliJ 9 Community Edition?
Chrome 41 as browser with GWT Developer Plugin,
URL for the appp is http://linux:8080/myapp/?gwt.codesvr=127.0.0.1:9997
add -nosuperDevMode to the launch config,
add javaee.jar from Glassfish 4.1 to the top of its classpath

Can't see java code when runnig GWT 2.5 in SuperDev mode

I have a GWT 2.5 app following Thomas Broyer's maven archetypes. I've followed the guidelines explained in the SO question and everything seems to be OK.
The code server is running properly. I browse my app and I start the dev mode from bookmarks copied to the toolbar. After starting dev mode, I can see the dialog with the compile button. After clicking the button, I can see the compiler working in Eclipse console. However, when I try to see java code on Chrome browser I can see javascript code only.
I don't know if it could be relevant, but I'm starting the code server from maven with gwt-maven-plugin's gwt:run-codeserver goal.
This is a known issue: Chrome changed the way it deals with Source Maps and this lead to an incompatibility with how GWT produces them.
This is fixed in 2.5.1-rc1 that's just been published to Central (a couple days ago, not yet officially announced). See http://mojo.codehaus.org/gwt-maven-plugin/user-guide/using-different-gwt-sdk-version.html to use it into your build. I'll release a new version of the gwt-maven-plugin that "links" to this version, and then update the archetypes.

IDE Breakpoints for GWT 2.5 SourceMaps in Chrome?

I have started using GWT 2.5 with Eclipse as my IDE. When using the debugger in Chrome, it is onerous to sort through the source file listing to set my breakpoints. It is even worse when I already have the relevant code open in Eclipse, and I have to find it in Chrome now.
Is there a way to set a breakpoint in Eclipse, and make use of that in Chrome?
This seems like a natural concept given the existence of SourceMaps. If it isn't already a part of the SourceMaps specification, perhaps it should be.
That's not possible in Eclipse (yet?)
I've been told JetBrains is working on it for IntelliJ IDEA though.
If you're using Javascript, then why not just add the line
debugger;
to your code?
It should pause execution on that line, and you can do it from eclipse/whatever IDE you're using.

NetBeans and GWT Fast edit/refresh in Development mode

I'm using NetBeans with the GWT plugin. Unlike Eclipse, I'm required to build everytime I want to reflect a change in my browser.
Is there a way to eliminate this step in NetBeans?
Are you using Gwt4nb plugin? It allows you to do Development Mode when you are debugging your project. Then when you change your GWT code, just refresh your browser window and you will see changes.
I'm using NetBeans for almost 3 years already with GWT and never had problems with that plugin, never needed to got to Eclipse.