Build debug JavaScript UI
Always compile the PRETTY version of the JS UI. This allows users to add ?dbg=1 to the URL to load the pretty formatted JS and isolate client-side errors, producing better error reports for developers working on Gerrit. The pretty JS format is more verbose and not commonly requested. It is not compressed in the WAR, under the assumption that it is only used when a bug is reliably occurring and the user wants to determine its source. Change-Id: I3058cb3c7233d6b93ce7a4f1f59451d3ea7f5cdc
This commit is contained in:
parent
e9ca9a1837
commit
d07a622ba1
@ -133,10 +133,17 @@ using an administrator user account:
|
||||
Debugging JavaScript
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
When debugging browser specific issues use `-Dgwt.style=DETAILED`
|
||||
so the resulting JavaScript more closely matches the Java sources.
|
||||
This can be used to help narrow down what code line 30,400 in the
|
||||
JavaScript happens to be.
|
||||
When debugging browser specific issues add `?dbg=1` to the URL so the
|
||||
resulting JavaScript more closely matches the Java sources. The debug
|
||||
pages use the GWT pretty format, where function and variable names
|
||||
match the Java sources.
|
||||
|
||||
----
|
||||
http://localhost:8080/?dbg=1
|
||||
----
|
||||
|
||||
To use the GWT DETAILED style the package must be recompiled and
|
||||
`?dbg=1` must be omitted from the URL:
|
||||
|
||||
----
|
||||
mvn package -Dgwt.style=DETAILED
|
||||
|
@ -202,16 +202,32 @@ limitations under the License.
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>gwt-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<module>${GerritGwtUI.browserType}</module>
|
||||
<extraJvmArgs>-Xmx512m</extraJvmArgs>
|
||||
<compileReport>${gwt.compileReport}</compileReport>
|
||||
<disableClassMetadata>true</disableClassMetadata>
|
||||
<disableCastChecking>true</disableCastChecking>
|
||||
<draftCompile>${GerritGwtUI.draftCompile}</draftCompile>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>optimized</id>
|
||||
<configuration>
|
||||
<module>${GerritGwtUI.browserType}</module>
|
||||
<extraJvmArgs>-Xmx512m</extraJvmArgs>
|
||||
<compileReport>${gwt.compileReport}</compileReport>
|
||||
<disableClassMetadata>true</disableClassMetadata>
|
||||
<disableCastChecking>true</disableCastChecking>
|
||||
<draftCompile>${GerritGwtUI.draftCompile}</draftCompile>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>debug</id>
|
||||
<configuration>
|
||||
<style>PRETTY</style>
|
||||
<module>${GerritGwtUI.browserType}</module>
|
||||
<extraJvmArgs>-Xmx512m</extraJvmArgs>
|
||||
<disableClassMetadata>true</disableClassMetadata>
|
||||
<disableRunAsync>true</disableRunAsync>
|
||||
<draftCompile>true</draftCompile>
|
||||
<webappDirectory>${project.build.directory}/${project.build.finalName}_dbg</webappDirectory>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>compile</goal>
|
||||
</goals>
|
||||
@ -232,6 +248,7 @@ limitations under the License.
|
||||
<configuration>
|
||||
<target>
|
||||
<property name="dst" location="${project.build.directory}/${project.build.finalName}"/>
|
||||
<property name="dbg" location="${project.build.directory}/${project.build.finalName}_dbg"/>
|
||||
<property name="app" location="${dst}/gerrit_ui"/>
|
||||
|
||||
<mkdir dir="${app}"/>
|
||||
@ -247,6 +264,16 @@ limitations under the License.
|
||||
<outputmapper type="glob" from="*" to="${app}/*.gz"/>
|
||||
</redirector>
|
||||
</apply>
|
||||
|
||||
<copy file="${dbg}/gerrit_ui/gerrit_ui.nocache.js"
|
||||
tofile="${app}/gerrit_dbg.nocache.js"/>
|
||||
<copy todir="${app}" overwrite="false">
|
||||
<fileset dir="${dbg}/gerrit_ui">
|
||||
<include name="**/*.html"/>
|
||||
<include name="**/*.css"/>
|
||||
<include name="deferredjs/**/*.js"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
Loading…
Reference in New Issue
Block a user