Integrat Debug Panel for GWT in Vaadin

Hello everybody

I try to integrat the GWT Debug Panel into my Vaadin Application.

GWT Debug Panel

After some hours of trying to integrat the gwt widget into the application I finally managed to see the expected GWT widget.

But now I have an other problem. To make this widget work I need to add a JavaScript snippet to my host HTML file:

The script looks like this:

<script type="text/javascript" language="javascript"> var stats = window.__stats = []; window.__gwtStatsEvent = function(evt) {   stats[stats.length]
 = evt;   var listener = window.__stats_listener;   listener && listener(evt);   return true; } </script>

I know it is possible to add java script with the help of a Label or CustomLayout. It works quite well with an simple Alert script.
But so far I was not successful with script above.

For any help I would be very thankful.

Did you try
Vaadin debug window
? (just add ?debug to your url). Firebug is also a great tool.

What kind of profiling info you want to get?

Hello Joonas,

Yeah I know this debug window, but it is not sufficient for my application.

What I want is a method to measure the time required to start,process and present the data on the gui.
More or less the entire round trip time.

This data should than be stored on the server ( database) for a performance history.

Both the vaadin debug window as well as the GWT debug panel would provide the right kind of data, but both do not collect data and both do not provide an interface to send the data back to the server. (as much as I know).

So my idea was to extend the existing GWT debug panel for my needs.

Although GWT is new for me, it was quite easy to make the GWT debug panel working (with a simple GWT application), so I hoped it would be similar easy to integrate this into my vaadin application.

Maybe you could give me some hints how to adjust the Vaadin debug window, so I could use (and extend) this one to my needs :wink:

How about creating an add-on widget that stores that data back to server (and provides API there for the rest of the application to collect the data). Then you could use normal variable change mechanism for pushing the data back to server-side along the normal communications with minimal overhead.

In order to collect the data from the client side you must add an event registration mechanism to the Vaadin client-side implementation for the add-on to use. If the API would be simple, clean (thus leave the most of the implementation in the custom add-on widget) and would not cause overhead, it could be included in the Vaadin core. Just write a ticket with API spec and implementation patch.