• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

Debugging GWT

Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone with experience of GWT, know how hard it is to debug your application ?

Whats involved ?


Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Paul,

Debugging a GWT application is as easy as debugging any Java application.

Your code is written in Java and GWT provides something called "Hosted Mode" which acts like a sandpit around a web browser instance as well as providing a simple servlet engine for any servlets/rpc code you have.

Hosted Mode allows your IDE's debugger to communicate directly with it so you can step through the code, set watchpoints, interrogate variables just as if it was a standard Java program.

Once you step away from hosted mode and compile your code, then debugging enters the realms of JavaScript debugging which you can use any tools you have for that. The default output from the compiler is obfuscated code which is damn difficult to understand let alone debug! But you can tell the compiler to output code in a more human readable form (using the -style PRETTY or -style DETAILED switches) and then insert as many "debugger;" statements as you wish.

In my experience though, the only time you need to dig into JavaScript debugging is if you are right at the very edges of GWT capability or building new cross browser fucntionality yourself (as opposed to relying on GWT's support). This should be quite a minimal amount of time.

My, my, aren't you a big fella. Here, have a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic