• 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Debugging GWT

 
Greenhorn
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 ?

Cheers

Paul
 
author
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.

//Adam
 
Everyone is a villain in someone else's story. Especially this devious tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!