Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT Super Dev Mode - bindAddress - changes not showing

Tags:

gwt

I have used GWT Super Dev Mode since 2.5 without any problems. Recently I upgraded Eclipse and GWT to 2.6 at the same time. Everything seems to work up to the point I make any changes to my code:

  1. Start web server - ok
  2. Start super dev mode codeserver - initial compile ok
  3. Open code server - ok
  4. Open page - ok
  5. Make code change
  6. Hit bookmark "Dev mode on" - compile ok
  7. Reload page - no changes!?

I use "-bindAddress 192.168.5.151" in my run configs to be able to browse from different devices. If I remove -bindAddress everything works again. Why?

like image 399
Carl Avatar asked Feb 21 '14 11:02

Carl


People also ask

What is Super Dev Mode in GWT?

Like its predecessor (which I’ll call classic Dev Mode), Super Dev Mode allows GWT developers to quickly recompile their code and see the results in a browser. It also allows developers to use a debugger to inspect a running GWT application. However, it works differently. Super Dev Mode requires the xsiframe linker.

How to enable GWT development mode (DEVMODE)?

Goto the Debug Configurations and choose the GWT Development Mode (DevMode) launcher configuration. Then choose the GWT Development Mode (DevMode) and then choose the launcher created.

Why can't I debug the widgetset in GWT?

In case debugging is not working, make sure you are running gwt in super dev mode, and that widgetset is compiled (use bookmars from gwt code server).

How does the code server work with GWT?

The code server runs the GWT compiler in draft mode (with most optimizations turned off) and makes the compiler’s output available at a URL that looks something like this: and then sets a special value in session storage and reloads the page. > window .sessionStorage [ "__gwtDevModeHook:hello" ] "http://localhost:9876/hello/hello.nocache.js"


1 Answers

In GWT 2.6, to make SuperDevMode more secure (and, BTW, it's now enabled by default, so no need to set the devModeRedirectEnabled property any longer), it's now only enabled on localhost or 127.0.0.1 by default.

If you open your browser console you should see a line saying something like:

Ignoring non-whitelisted Dev Mode URL: http://192.168.5.151:9876/

You can whitelist more codeserver URLs using a regexp in the devModeUrlWhitelistRegexp configuration property. FYI, the default configuration would read something like this:

<set-configuration-property name="devModeUrlWhitelistRegexp" value="http://(localhost|127\.0\.0\.1)(:\d+)?/.*" />

In your case, you'd use:

<set-configuration-property name="devModeUrlWhitelistRegexp" value="http://(mymachinename|192\.168\.5\.151)(:\d+)?/.*" />

BTW, this was explicitly called out in the release notes: http://www.gwtproject.org/release-notes.html#Release_Notes_2_6_0

like image 99
Thomas Broyer Avatar answered Oct 20 '22 19:10

Thomas Broyer