Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: Chapter 3 Assembling and Deploying Applications
- Next: JPDA Options

# Enabling Debugging

When you enable debugging, you enable both local and remote debugging. To start the server in debug mode, use the `--debug` option as follows:

    asadmin start-domain --debug [domain-name]

You can then attach to the server from the debugger at its default JPDA port, which is 9009. For example, for UNIX systems:

    jdb -attach 9009

For Windows:

    jdb -connect com.sun.jdi.SocketAttach:port=9009

Application Server debugging is based on the JPDA (Java Platform Debugger Architecture). For more information, see JPDA Options.

You can enable debugging even when the application server is started without the `--debug` option. This is useful if you start the application server from the Windows Start Menu or if you want to make sure that debugging is always turned on.

## To set the server to automatically start up in debug mode

1. Select the JVM Settings component under the relevant configuration in the Administration Console.

2. Check the Debug Enabled box.

3. To specify a different port (from 9009, the default) to use when attaching the JVM to a debugger, specify `address=` port-number in the Debug Options field.

4. If you wish to add JPDA options, add any desired JPDA debugging options in Debug Options. See JPDA Options .

##### See Also

For details, see the Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Administration Guide.

- Previous: Chapter 3 Assembling and Deploying Applications
- Next: JPDA Options

- © 2010, Oracle Corporation and/or its affiliates