Java Reference
In-Depth Information
typically the command-line arguments passed to the application server that
enable the Java Platform Debugger Architecture ( JPDA ). When running your web
application, no additional arguments are required; when debugging, the appli-
cation server needs to use the JPDA to broadcast the service to which IDEA 's
debugger may attach.
One of the extra environment variables is a port number, but don't con-
fuse the Port field with the general port number of your web or applica-
tion server. This port represents a new service available in debug mode
only, the remote JVM 's JPDA debugging data. This is the port over which
IDEA receives runtime information from your JVM , such as the current
executing line number.
NOTE
In the case of a local configuration, the Startup/Connection tab lets you specify
the startup and shutdown scripts for the application server as well as any environ-
ment variables that should be passed to the application server's invocation. You
can rely on debugging support for the web application as you're configuring the
web application server to enable the JPDA . In the case of a remote configuration,
the tab doesn't automatically enable remote debugging; rather, it tells you what
command-line arguments need to be added to the remote server's JVM in order
to enable remote debugging and connect via the JPDA . If the remote application
server wasn't started with these arguments in its command line, remote debug-
ging won't be possible.
Assuming that the server, local or remote, has been started with remote debug-
ging enabled, IDEA lets you step through a web application using the same interface
as debugging a standalone Java application. The Debug tool window is augmented
to show the deployment status of the web applications and to show the server con-
sole in lieu of the JVM console, as shown in figure 11.22.
When you alter your source code, recompile, build a new WAR file, and
provide it to the web application, your changes may not take effect, be-
cause the new WAR may not be automatically deployed to the server.
Some web application servers support automatic hot deployment, and
some don't. If you're unsure or wish to force a new WAR to be used, you
can undeploy and redeploy web applications using the controls in the
Run or Debug tool window.
TIP
 
 
 
Search WWH ::




Custom Search