Super dev mode from Intellij (new)

Latest Intellij seems to support debugging client side Vaadin. Tested on Intellij 15 and Vaadin 7.4.7.


Note: The log level is a quirk to work-around an issue with mgwt hick-up.


Debugging with Intellij using source maps



Go to Run > Edit Configurations, click + button in the upper left corner (or hit ⌘N) and choose JavaScript Debug.

Configuration should look like this:

Put breakpoint in some client code and hit debug button. Chrome browser will start and debugging should now happen in Intellij.

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).

Super dev mode from vaadin code-server (old)

$ cd /path/to/magnolia_widgetset

$ mvn clean install -U

$ mvn vaadin:compile

$ mvn vaadin:run-codeserver

[INFO] The code server is ready.
[INFO] Next, visit: http://localhost:9876/

Create Bookmark.

I have the following projects open in IDE (used for server side Java debugging):

Start up Magnolia (tomcat) from your IDE. Go to e.g. http://localhost:8080/.magnolia/admincentral

Hit the super-dev-mode-bookmark. Open chrome/firefox debugger. Enable source mapping (default):

Note: There is a plugin for eclipse, which will allow debugging the source maps in eclipse. Intellij should allow it per default. But did not get it running.

Eclipse launch configuration

Below is a launch configuration for eclipse. (warning) After importing, you will have to update the GWT libs on the classpath in "Debug Configurations..." (pointing to my maven repo by default).

Note that it does not enable debugging in the IDE.

M5 SuperDevMode.launch


Opening apps from the app-launcher is not working, due to mgwt. As a workaround use the browser location to get into your app: http://localhost:8080/.magnolia/admincentral#apps:pages

IntelliJ shows (compilation) errors related to language level

It seems that in some cases, the GWT compiler seems to default to Java 7, ignoring all other configuration. This shows as error messages in the editor like Lambda expressions are not supported at this language level. GWT facet of your module is configured with language level 1.7.

To force it using a certain language level, open your widgetset module's GWT facet settings (see above) and add the following under "Compiler parameters":

-sourceLevel 8