Latest Intellij seems to support debugging client side Vaadin. Tested on Intellij 15 and Vaadin 7.4.7.
-nostartServer -logLevel DEBUG -noincremental
-nostartServercurrently seem to be blocking the configuration - even when removed, the configuration works, so you can remove it.
Note: The log level is a quirk to work-around an issue with mgwt hick-up.
<dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.6.2</version> </dependency>
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).
$ 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/
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.
Below is a launch configuration for eclipse. 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.
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
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":