how to debug client-side code

hello vaadiners

I am using eclipse 3.7 for J2EE developers , with the eclipse plugin for vaadin installed of course

I am developing gantt-chart component for vaadin

And I would like to know if some data is correctly transfered to the client-side

I thought the easy-est way to do this is to just simply print it out to the console with GWT.log() calls

But when I compile the widgetset (gwt translates java to javascript) these calls are optimized out , so when I try to test run my application , it shows nothing in the console

I have seen that in the project properties panel/dialog/window for my vaadin project under vaadin setting, there is a ‘create development mode launch’ button in the ‘widgetsets’ section I have pushed it but it didn’t do anything visible at all

So what is this button good for/how to use it?

And in general: I if I have a custom vaadin addon with both client and servers side , how can I debug my client side code?

Peter

By clicking this button, you should get a new file in the root of your project called “GWT development mode for YourProjectName.launch”. This is a launch configuration that you can start by right-clicking the file and selecting
Debug As → GWT Development mode
. This launches the GWT Development Mode window and from there you can launch your application in browser with the required
gwt.codesvr
parameter in the URL.

You might be prompted to install the GWT plugin first to your browser if you haven’t got it installed. Also notice that the initial startup of the application in development mode takes a bit time.
12110.png

The generated development mode launch is actually a Java launch configuration, so it should not be necessary to have the GWT plug-in installed.

To clarify, I was originally referring to the GWT Developer Plugin on the browser that is required for debugging. The Google Plugin for Eclipse is not required as Henri pointed out.

I have tried out what you have said Although it works its not that I want :frowning:

when I start this launch file my tasks , which data is comming from the server side from a database , dont show up, so there is no such communication between the server and the client ( or at least it is invisible for me)

Is there a GWT or vaadin client side method similar to GWT.log(), which doesn’t optimized out in production mode?

a client-side method which also writes to the the java console just in case of a server-side system.out.println method ?

Or a method that writes to the javascript console . or a method which writes to the firebug console/log ?

Thanks for your help in advance

Peter

How does it work with IntelliJ ? I have the ultimate version with GWT support and I can start the development mode easily if my project has a custom widget in it (because I am compiling a widgetset for it that Intellij recognizes)

But it does not work for a module that is using the default/standard widget (from the Vaadin jar).

Any experience here?