📜 ⬆️ ⬇️

Run GWT Super Dev Mode for remote server

Our JEE application jumped the GWT version from 1.7 to 2.6.1 right away. There used to be small dances with a tambourine in order to configure the ability to debug the client part in the IntelliJ Idea development environment. Debugging is the ability to set breakpoints in the Java code, but to get into them from browser-based JavaScript generated by GWT from Java code. After updating the GWT version, the old debugger launch configuration stopped working, and I had to get acquainted with the GWT Super Dev Mode (SDM). After this "acquaintance", I realized that the above-mentioned "dances" were in fact an extremely simple and understandable setting, at least in comparison with SDM. I hope that this article will help someone to save a couple of days of wandering around the forums and get rid of several new gray hair. In the article I will tell you about the experience of launching the SDM mode in the following environment: IntelliJ Idea 14, JBoss EAP 6, GWT 2.6.1 using GWT RPC in the project, Chrome browser. Despite the fact that, with the release of Idea 14, there were reports of improvements regarding debugging in GWT, I think that for version 13, everything described below also applies. The application server used is also unlikely to somehow affect the SDM configuration. As for the GWT versions: for 2.6.0, almost one-to-one is applicable, the same applies to 2.7.0 (I did not check it myself, I read it on the Web in the course of research).

a common part


The good old debugging mode is now practically not supported in GWT, it was replaced by Super Dev Mode. This mode involves launching a specific application server, the so-called Code Server, which is responsible for deploying the original Java code and comparing it with JavaScript. Most sources describe the deployment of your Code Server application and working directly with it. Since I use IntelliJ Idea as my development environment, it is assumed that my application will be launched and deployed right in it. But in JEE, developers usually try to work with an environment as close as possible to the industrial environment, and the launch of the “from Idea” industrial server is nonsense. Thus, a dilemma arises: Code Server is running in the development environment, and the application server is running on a separate computer - how to make them friends? In principle, the web has all the necessary information, but it is scattered, contradictory, and there is even an answer to StackOverflow, which has many “pluses”, but it is incorrect. Based on these facts, as well as understanding how difficult and in general it is to launch SDM, I decided to write this manual.

Improvements and configuration




Launch



')
ATTENTION! Upon completion of debugging in GWT SDM mode, you should roll back the changes to .gwt.xml ("devModeUrlWhitelistRegexp") and rebuild the application!

Source: https://habr.com/ru/post/242989/


All Articles