Pregunta

I want to know how to debug the GWT application on server side. I am using eclipse and GWT default server. I run my application by right click and run as web application. I tried to use System.out.println and it didn't work.

¿Fue útil?

Solución

If you use the embedded server of DevMode, then it works just like for client-side: Debug as… ⇒ Web Application then set your breakpoints (either client-side or server-side, they run in the same JVM).

When you change your server-side code, Eclipse will recompile it on-the-fly (unless you disabled it, in which case you'll have to explicitly build your project) into your WEB-INF/classes (this is what the GPE should configure), then hit the "reload" button on the DevMode view in Eclipse (the two yellow arrows). The next call from the client to server will use the new server code (without the need to reload the app in the browser).
If Eclipse proposes to hot-swap the code on change, you can say "no".

Otros consejos

Follow the below steps to run in debug mode.

Right click on the project -> Debug As -> Web application

enter image description here

OR you can follow below steps also.

Click on Debug As.. as shown in toolbar of Eclipse -> Debug configuration -> Debug

enter image description here

enter image description here

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top