Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Debugging GWT

Posts: 5
  • Mark post as helpful
  • send pies
  • 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
  • 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.

    Bookmark Topic Watch Topic
  • New Topic