3

I'm trying to follow gwt tutorial and to use superdev mode. I see java source maps in Chrome browser, can put breakpoints but everything what I tried to add to the "watch expresion" window - did not work. So my question is how to use superdev mode for debugging?

I have created project as described in the tutorial

./webAppCreator -out MyWebApp com.mycompany.mywebapp.MyWebApp

and run

ant superdevmode

ant hosted

here is screen-shot what I see in "developer tools" window As you can see - variables closeButton and dialogBox are not defined

version of gwt - 2.6.1

verison of Chrome - 36.0.1985.125 m

enter image description here

corsair
  • 658
  • 5
  • 14

1 Answers1

6

In the current state of Source Maps, you cannot use "watch expressions" with the original language (Java in the case of GWT); you have to use the compiled-JavaScript names (the same you can see in Scope Variables)

This is a current limitation of Source Maps (and browsers). It affects all languages that compile to JS, not just GWT.

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
  • Is this still the case with latest GWT 2.8 Beta or GWT 3? I'm using GWT 2.8 with SuperDev and variables need to be appended the extra suffix. In Eclipse it's impossible to know what is the generated name of the variable, even while using SDBG, variables are not in their original form. Any possible ways to change this? Would setting GWT compiler to PRETTY improve this? didn't try yet. Thank you! – Dan L. Feb 25 '16 at 09:29
  • As said above, it's independent of GWT itself, it's a limitation of [Source Maps](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/view) (and if/when the spec will evolve, tools will have to implement it and it'll take some time). That said, using `-style PRETTY` is likely to help yes. – Thomas Broyer Feb 25 '16 at 11:06
  • experimenting it seems setting -noincremental param in CodeServer(without -style PRETTY) fixes the issue. I can see variables with their original names. Not sure what's the downside of setting this param. – Dan L. Feb 25 '16 at 11:38
  • Thanks. The -noincremental param suggestion worked well to see the java variables. – sandman Sep 18 '16 at 17:30
  • How to set this -noincremental param? – Magallo Jul 30 '20 at 11:32