5.3 Starting in Debug Mode
Prev | 5. Starting and Stopping Virgo Tomcat Server | Next

## 5.3 Starting in Debug Mode

### Linux

To start Virgo Tomcat Server in debug mode, run `startup.sh` passing in the `-debug` argument:

    prompt$ cd $SERVER_HOME
    prompt$ bin/startup.sh -debug

This will start the debug agent listening on port `8000` which is the default remote debug port used by Eclipse. To start in debug mode with a specific port number, pass this in as the value for the `-debug` argument:

    prompt$ cd $SERVER_HOME
    prompt$ bin/startup.sh -debug 8001

This will start the debug agent listening on port `8001`. To start in debug mode and suspend the VM until a debugger attaches, pass in the `-suspend` argument along with the `-debug` argument:

    prompt$ cd $SERVER_HOME
    prompt$ bin/startup.sh -debug -suspend

This starts the debug agent, but prevents Virgo Tomcat Server from actually starting until a debugger attaches to the agent. This can be useful when trying to diagnose problems that occur during startup.

### Microsoft Windows

To start Virgo Tomcat Server in debug mode, run `startup.bat` passing in the `-debug` argument:

    prompt> cd %SERVER_HOME%
    prompt> bin\startup.bat -debug

This will start the debug agent listening on port `8000` which is the default remote debug port used by Eclipse. To start in debug mode with a specific port number, pass this in as the value for the `-debug` argument:

    prompt> cd %SERVER_HOME%
    prompt> bin\startup.bat -debug 8001

This will start the debug agent listening on port `8001`. To start in debug mode and suspend the VM until a debugger attaches, pass in the `-suspend` argument along with the `-debug` argument:

    prompt> cd %SERVER_HOME%
    prompt> bin\startup.bat -debug -suspend

This starts the debug agent, but prevents Virgo Tomcat Server from actually starting until a debugger attaches to the agent. This can be useful when trying to diagnose problems that occur during startup.

Prev | Up | Next
5.2 Starting in Clean Mode | Home | 5.4 Starting with JMX Access Modifications