Unable to get SDM to use detailed mode for showing stacktraces

96 views
Skip to first unread message

Ali Akhtar

unread,
Feb 13, 2015, 9:08:02 AM2/13/15
to google-we...@googlegroups.com
So I have the following set in my module.gwt.xml:

    <set-property name="compiler.emulatedStack" value="true"/>
   
<set-configuration-property name="compiler.emulatedStack.recordLineNumbers" value="true"/>
   
<set-configuration-property name="compiler.emulatedStack.recordFileNames" value="true"/>


I also have :
<style>DETAILED</style>


set in pom.xml in the config of the maven plugin.

But still, in sdm, when an error happens, the stacktrace I get is obfuscated:

 com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) : Cannot read property 'setValidationState_0_g$' of undefined
Unknown.pY_g$(Module-0.js@19:15103)
Unknown.lY_g$(Module-0.js@8:15058)
...

Its strange because the other configuration settings that I set in pom.xml, such as launcherDir, do take effect.

I have also tried passing in -Dgwt.style=DETAILED as a jvm argument, but it has no effect either. I'm using mvn gwt:run-codeserver for running SDM.

Am I doing anything wrong?

Thomas Broyer

unread,
Feb 13, 2015, 10:03:06 AM2/13/15
to google-we...@googlegroups.com
See https://code.google.com/p/google-web-toolkit/issues/detail?id=9046

Also, CodeServer (SDM) has no -style argument, the <style> property documented for gwt:run-codeserver is an artifact of how badly things are implemented in the plugin (to workaround limitations of Maven that would have otherwise required a lot of copy-pasting); it actually does nothing with gwt:run-codeserver.

Ali Akhtar

unread,
Feb 13, 2015, 10:08:30 AM2/13/15
to google-we...@googlegroups.com
Is there a workaround for getting the stacktraces to show up without being obfuscated?

Do I need to set stackEmulated=native?

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/He7Q5NBIQZU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Jens

unread,
Feb 13, 2015, 10:35:40 AM2/13/15
to google-we...@googlegroups.com

Is there a workaround for getting the stacktraces to show up without being obfuscated?

If you use Chrome 40 and use the UncaughtExceptionHandler I linked in the issue (comment #4) then you do not need anything regarding stack traces in your module xml. Any exception you do not catch will be logged nicely to browser console with clickable links to your source mapped Java file.

-- J.

Ali Akhtar

unread,
Feb 13, 2015, 10:50:05 AM2/13/15
to google-we...@googlegroups.com
Thanks Jen.

Using your class, the method names of the exceptions are still obfuscated, but at least it shows the class name and line number, which can be clicked to get to the source.

While we're on the topic, is there a similar workaround for debugging (setting break points, etc)? If a breakpoint is set in Chrome, the scope variables all have obfuscated names. Is there a way to debug from within the IDE? 

--
Reply all
Reply to author
Forward
0 new messages