This document covers running and debugging when using a pre-GWT 2.0 SDK. If you are using a GWT 2.0 SDK or later, check out the new documentation.
Creating a Launch Configuration
If you created a project using the New Web Application Wizard, a launch configuration will have already been created for you. It can be found by navigating to the Launch Configuration dialog. Select the Run Configurations... item from the drop-down menu associated with the Run toolbar button:
If you're interested in debugging your application, select the Debug Configurations... item from the drop-down menu associated with the Debug toolbar button.
Tip: You can also launch your application by right-clicking the project (or an HTML or JSP page within the project) and selecting Run As/Debug As > Web Application from the context menu.
Now, expand the items underneath the Web Application category. You should see a launch configuration with a name matching your project name. Click on the launch configuration.
Notice that the Web Application launch configuration has the Main, Server, GWT, App Engine, and Arguments tabs. The Main tab allows you to choose the project that is associated with the launch configuration and change the main class used by the launch. The Server tab allows you to choose a different port for the built-in server. In general, you'll want to run the built-in server, unless you have a specific server instance that you want to test against.
The GWT settings tab contains the GWT settings for the launch configuration.
In addition to customizing the log level and compiler output style, you can also tweak the set of Available Modules for the launch. All modules you want to access during the hosted mode launch must be included in this list (excluding any inherited modules). The actual set of modules that will be loaded at startup will be determined by the HTML page you launch with (specified in the URL field at the top).
If you need to change settings that are not represented on the Main, Server, GWT, or App Engine tabs, you can switch to the Arguments tab and enter them alongside the computed arguments.
Running the Launch Configuration
To launch the web application, click on the Run button in the lower-right corner of the Run Configurations dialog. You can also run your application via context menu shortcuts. To do this, select either a project, a GWT Module file, or an HTML/JSP page in the project's WAR directory, and right-click to bring up a context menu. Then, run the application by navigating to Run As > Web Application. Notice that after you run the launch configuration, it will appear in the Run shortcut list:
If your project uses GWT, the hosted browser will navigate to the startup URL for the launch configuration.
If your project uses Google App Engine and GWT, the only difference is that the embedded server is actually the Google App Engine development server.
Note: If your application uses GWT and you make change to your code during a debugging session, you may need to click Refresh in the hosted browser window or Restart Server in the hosted shell. See the GWT documentation on hosted mode debugging for more details.