4

I'd like to debug a GWT 2.7 based app using sourcemaps in Chrome. However, I don't want all sources to be included in the shipped WAR file. I managed to generate sourcemaps during Maven build using saveSource compiler setting. Question now is, how can a "attach" sourcemaps to a running system from within the Browser.

I already have the sourcemap json file served by a local server and was also able to load sources from there by using context menu of the generated GWT js file: enter image description here

This shows the java package hierarchy on the left - cool! However, break points in java files don't work and the source map entries disappear again on page reload, which means I would not be able to debug any initialization logic.

Any ideas?

StefanR
  • 538
  • 5
  • 14

1 Answers1

1

Starting a new project, in my gwt module, I added the following lines of code:

<set-property name="compiler.useSourceMaps" value="true"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
<set-configuration-property name="CssResource.obfuscationPrefix" value="empty"/>

Starting the dev server in super dev mode after this allowed me to view my java code and also debug in all classes, including the entry point class. When a java breakpoint is set in the entry point class (I am using chrome 43.0.2357.81 m at this moment) I am able to refresh the page and the breakpoint is hit again.

Hope this helps!

Albert Scholtz
  • 337
  • 3
  • 15
  • Hi Bushaman...i have one Q(https://stackoverflow.com/questions/31131175/migrating-classic-dev-mode-to-super-dev-mode-using-gwt-2-5-1) changes are not taking – moh Jun 30 '15 at 07:03
  • @mohammedsameen I don't have enough rep to comment on the question you are referring to but it would help if you post your command that you use to launch the code server with. – Albert Scholtz Jun 30 '15 at 08:26