Skip to content

Instantly share code, notes, and snippets.

@icfantv
Created February 6, 2014 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icfantv/8852157 to your computer and use it in GitHub Desktop.
Save icfantv/8852157 to your computer and use it in GitHub Desktop.
gwt.xml snippet
<!-- this will cause both a production and debug version of the code to be built. in the event of
a client-side error, the user can specify ?debug=true on the URI as the query string and the
debug version of the code will be used such that an emulated stacktrace will be displayed.
This has the effect of us being able to see exactly on what lines of code the error is
occurring.
Additionally, the debug flag is used to dictate what type of error dialog is presented to the
user in the event of an exception being thrown. In production mode, only a simple dialog
with the exception error is displayed. In debug mode, a dialog is displayed with the
exception stacktrace (if available). -->
<set-property name="compiler.emulatedStack" value="true, false"/>
<property-provider name="compiler.emulatedStack">
<![CDATA[return (location.search.indexOf("debug=true") != -1) ? "true" : "false";]]>
</property-provider>
<set-configuration-property name="compiler.emulatedStack.recordFileNames" value="true"/>
<set-configuration-property name="compiler.emulatedStack.recordLineNumbers" value="true"/>
<!-- turn off logging by default but enable it when we are running in debug mode -->
<inherits name="com.google.gwt.logging.Logging"/>
<set-property name="gwt.logging.popupHandler" value="DISABLED"/> <!-- turn off the popup logger -->
<set-property name="gwt.logging.enabled" value="FALSE"/>
<set-property name="gwt.logging.enabled" value="TRUE">
<when-property-is name="compiler.emulatedStack" value="true"/>
</set-property>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment