How to debug "revealPlace" with GWT super dev mode?

71 views
Skip to first unread message

matt d.

unread,
May 4, 2015, 4:14:37 PM5/4/15
to gwt-pl...@googlegroups.com
Hello,

I just started using the superdev mode with GWT2.7 (before that I was using the normal dev mode).

I must have one issue with one of my Presenter but I can't find out how to probably debug my code.

Any suggestion?

Here is the scenario:
I reveal a Presenter with this code:

this.placeManager.revealPlace(new PlaceRequest(NameTokens.MAIN_PAGE));

This "MAIN_PAGE" presenter contains other Presenters, also containing other Presenters.

This revealPlace command fails with this message:

Breaking on exception: com.google.web.bindery.event.shared.UmbrellaException: Exception caught: (TypeError) : Cannot read property 'getColumnCount_2_g$' of undefined

(probably caused by a grid not correctly initialized)

If I run superdev mode in debug mode, I can't find out which line from the source code is really failing.

The stack is;
doFire_0_g$(SimpleEventBus.java:203) <= this is where the code ends
 fireEventFromSource_1_g$(SimpleEventBus.java:96)
  fireEvent_11_g$(PlaceManagerImpl.java:155)
   doRevealPlace_0_g$(PlaceManagerImpl.java:130)
    revealPlace_1_g$(PlaceManagerImpl.java:351)
     revealPlace_0_g$(PlaceManagerImpl.java:332)
      redirect_0_g$(LoginPresenter.java:169) <== this is where the revealPlace command is called.

So basically my problem is that those calls to PlaceManagerImpl are like a blackbox, and I loose track of my code...
Any idea how I could debug this (I could go back to the normal dev mode but I really want to start using the super dev mode as from now)

In the normal dev mode, such failure could be immediately fixed as the line causing the issue could be easily identified.

thanks!
Matt

Richard Wallis

unread,
May 4, 2015, 4:23:39 PM5/4/15
to gwt-pl...@googlegroups.com
You need to unwrap the umbrella exception to see what the actual exception that causes it is:

See http://www.passionforprogramming.com/?p=11



--
You received this message because you are subscribed to the Google Groups "GWTP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwt-platform...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

matt d.

unread,
May 4, 2015, 5:05:38 PM5/4/15
to gwt-pl...@googlegroups.com
Hi Richard,
Great! Thanks for a lot :-)
It really helped and I could find out the exact line causing the issue. 

Unwrapping the umbrella exception (as shown in your link) gives me this kind of output:
(TypeError) : Cannot read property 'getColumnCount_2_g$' of undefined
com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read property 'getColumnCount_2_g$' of undefined
  at refresh_19_g$
  at updateColumnHeaders_0_g$
  at updateDescriptions_45_g$
  at onUpdateDescriptions_31_g$

By searching on the method name 'updateColumnHeader' I could find back the faulty method. 

One more question...:
Are you aware of any way of printing the real Java methods (because I have multiple classes using the same method names)? 
thks!
Matt

Richard Wallis

unread,
May 5, 2015, 2:44:06 AM5/5/15
to gwt-pl...@googlegroups.com
Hi Matt,

No I don't know a way to print the fully qualified name in the stack trace.

Clay Harris

unread,
May 5, 2015, 8:51:10 AM5/5/15
to gwt-pl...@googlegroups.com
I think pretty or detailed mode will give you more information at least - http://css.dzone.com/news/understanding-gwt-compiler.  Especially detailed mode, though you wouldn't want to run it in production - more overhead.

Maxime Mériouma-Caron

unread,
May 5, 2015, 9:44:40 AM5/5/15
to gwt-pl...@googlegroups.com
Have you tried adding this to your gwt.xml module :

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

matt d.

unread,
May 5, 2015, 12:43:29 PM5/5/15
to gwt-pl...@googlegroups.com
Hi, 
Thanks for the feedback.

I tried to "detailed" mode, but it is strange - it seems that the superdev mode does not take it into account (I still see exactly the same stack), although I checked the generated js file on the server which is correctly compiled in "detailed" mode (all method names including the class name etc). Superdev mode still a bit mysterious to me...

Should I pass the "detailed" mode in a specific way for the superdev mode?

matt d.

unread,
May 5, 2015, 12:49:25 PM5/5/15
to gwt-pl...@googlegroups.com
Hi Maxime,
thanks - I didn't know about those properties.
I have added them - does not seem to make any difference though.
Are they for superdev mode ?

Maxime Mériouma-Caron

unread,
May 9, 2015, 12:38:54 PM5/9/15
to gwt-pl...@googlegroups.com
Hmm, yes, I think
Reply all
Reply to author
Forward
0 new messages