Wednesday, June 18, 2014

Re: GWT.isProdMode = true in SuperDevMode



On Wednesday, June 18, 2014 4:27:25 PM UTC+2, AJ wrote:
I have just started using SDM in Chrome (see other threads) an it looks like GWT.isProdMode returns true.
Using eclipse (Kepler) onWindows 7
I start the code server then start the app, either in debug or run mode.
Then click the bookmark Dev Mode On
Then click the button Comple in the browser window
Then open the code in browser debugger and set a breakpoint
Refresh the app and the breakpoint hits, step into the isProdMode code
  public static boolean isProdMode() {
    // Replaced with "true" by GWT compiler.
    return false;
  }
step out and look at the result of
boolean isProd = GWT.isProdMode()
it == true

Is there something I am not doing that I should to make SDM know it is in dev mode?

isProdMode is (currently, see [1]) expected to return "true" in SDM, because SDM is a form of "prod mode".

Currently, there's no easy way to know whether you're in SDM or not. SDM sets a deferred-binding property "superdevmode" to "true" though, so you can use that in a deferred-binding rule if you *really* need to know.

[1] https://code.google.com/p/google-web-toolkit/issues/detail?id=7634

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment