Limit the user.agent Property
GWT compiling is resource intensive due to the number of compilations that happen for the browsers supported. At times, you will run out heap space or other resources before the compile can finish (this usually manifests itself as a StackOverflowError).
The following entries in your *.gwt.xml file can help by only compiling for the single browser you may be testing on:
Valid values for the user.agent property are: ie6,gecko,gecko1_8,safari,opera
Limit the gwt.compile.localWorkers
You can also scale back the number of threads to use for running parallel compilation. While this may hurt performance, you will be able to finish the compilation without running out of resources. This property, gwt.compile.localWorkers, can be added to the compile option in your ant script.
Bump the GWT version from 1.6.4 to 1.7.0
GWT 1.7.0 seems to have resolved many of the compilation resource issues with GWT.
GWT Pretty Print Compile
A good example from Nick:
This is literally saving me hours. By adding a line to the the end of the
printStackTrace() function you can alert out the stacktraces that normally do nothing when compiled.
Open up the gwt script file (xxxxxxxxxxxxxxxxxxxxxxxxx.cache.html) for your particular browser. I find it by seeing what's loaded in firebug.
Search for "function $printStackTrace"
Add a new line right before the function returns:
It should now look like this.
In Code Breakpoints
Rather than sifting through the script debugger window trying ot figure out where to put a breakpoint, you can use the following line of code to embed a breakpoint: