server debug command

Starts the named Open Liberty server in debug mode.

Runs the named server in the console foreground after a debugger connects to the debug port. The standard output and error from the server process are output to the foreground. The default port is 7777. You can use the ${WLP_DEBUG_ADDRESS} variable to specify an alternative port.

Usage examples

Start the myserver server in debug mode:

server debug myserver

Start the myserver server in debug mode and set the variable_name variable to the variable_value value:

server debug myserver -- --variable_name=variable_value

Syntax

Run the command from the path_to_liberty/bin directory.

server debug serverName [options]
serverName

The name of the server to run the command against. If no server is specified, a server called defaultServer is automatically created to run the command against.

options

One or more optional parameters.

Options

Option Description

--variable_name=variable_value

Defines variables. Include -- in the command before you specify the option, as shown in the usage example.

Variables that are specified on the command line override all other sources of variables and can’t be changed after the server starts.

See also

Exit codes

The following exit codes are available for the server debug command and the equivalent executable JAR file ws-server.jar:

0

OK. 0 indicates successful completion of the requested operation.

1

1 indicates invocation of a redundant operation, such as starting a started server or stopping a stopper server. 1 might also be returned if the JVM options that were used are not valid.

2

2 indicates that the server does not exist.

>=20

Exit codes greater than or equal to 20 indicate that an error occurred while performing the request. Messages are printed and captured in log files with more information about the error.

Unresolved include directive in modules/reference/pages/command/server-debug.adoc - include::server-serverprocess.adoc[]