Debug a remote JBoss's GWT App in Eclipse - 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

Related

Cannot watch expressions of GWT under debug mode in 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.

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).

GWT SuperDev - Can't find GWT Modules

I have followed the steps given on this page - getting-started-with-the-superdevmode
but I am still getting message - Can't find any GWT Modules on this page. I did some more googling but could not find any solution until now.
I am using GWT 2.6.1 and eclipse kepler 64 bit on ubuntu.
Here are the steps I did.
Created a new Web app project for GAE, using GWT 2.6.1 and GAE sdk 1.9.6.
Go to Run configurations. Create a new configuration for a "Java Application". Change the main class, Argument and add jar file as shown in the screenshot.
Check the apps .gwt.xml file. It already has <add-linker name="xsiframe"/>. I have tried adding devModeRedirectEnabled property also. It did not help.
GWT compile the project.
Run the application as Web application. Default jetty config serves the application at
http://localhost:8888/SuperDev.html.
I opened up this page in firefox. I can see the page content.
Launch the Java application configuration. It does compile again and gives a success message and tells me to launch
http://localhost:9876/
I opened it in firefox and it shows -
Dragged Dev Mode On to firefox's bookmark. And clicked.
I get the message - Can't find any GWT Modules on this page.
Following are the configurations for my superdev mode java app. Did I miss anything?
You need to click the bookmarklet when viewing your compiled web app.
The last steps should therefore be:
Dragged Dev Mode On to firefox's bookmark.
Switched back to my application at http://localhost:8888/SuperDev.html and clicked the bookmark
Once you have the bookmarklets, you actually don't really need to open http://localhost:9876 anymore (you'll find compile logs there, and can browser your code, including the code generated by GWT generators; so it can still be useful).
I tried to do it with Eclipse Oxygen, Java7 (for run application, for oxygen you have to have java 8), and GWT Eclipse Plugin 3.0.0.
In such an environment all you need to do is:
On project right click > Debug As > GWT Legacy Development Mode with Jetty.
PS:
you have to have address like this
http://127.0.0.1:8888/StockWatcher.html?gwt.codesvr=127.0.0.1:9997
NOT like :http://127.0.0.1:8888/StockWatcher.html
After openning addres you must additionally install the plugin in the browser - you will be asked for it
It work on IE11

Debug Haxe from Eclipse

My goal is to debug Haxe application in Eclipse (publishing SWF) on Linux. I have manually installed Eclipse Helios, Flash debugger version and Haxe. I have installed Eclihx. Problem is that I'm getting message from Eclipse:
Flash debug runner. This feature isn't ready!
Note: I can run program, so Haxe compiling works. I have also tried adding -D and -debug to hxml. I've been Googling out there, but no success.
And also, I don't know how to setup Eclipse so when I do run that automatically browser pops up with html.
From what I know, it's not currently possible to debug Haxe from Eclipse. However, you could compile a debug Haxe build and and use Adobe's fdb.exe, which is the command line debugger for Flash. With it, you should be able to set breakpoints and do some run-time state inspection. Hope this helps!

Eclipse 3.4 + Tomcat 6.0 + Remote Debugging with Console Output

I'm using this configuration:
Eclipse 3.4 + Tomcat 6.0 + Remote Debugging
It's working great, I can debug a servlet and so on, no problems.
But, my servlet console output is going to $CATALINA_HOME/logs/catalina.out.
Is that possible to redirect to the Eclipse console window?
I use Log4J in my project but every entry goes to catalina.out and not my console window. It's really annoying.
Thanks.
I'd recommend getting the LogFile Tools plugin for eclipse: http://sourceforge.net/projects/logfiletools/
It gives you a new log file view that you can add word-based highlighting and essentially tail any file (such as the tomcat log). I usually have it highlight errors in red, for example so they pop out when viewing the log.
The other alternative is to actually start tomcat from within eclipse. You can do this via the eclipse web tools (a bit heavy) or the sysdeo tomcat launcher plugin (lightweight but doesn't do much but launch and update contexts)
Hope this helps!