Documentation Center

Setting up remote debugging of your JVM

To debug your JVM remotely, configure several JVM startup options either in the Windows registry or in the jvm.xml startup configuration file.

Procedure

  1. To configure remote debugging in the Windows registry, access or create the following registry key:
    HKEY_LOCAL_MACHINE\SOFTWARE\Tridion\Content Delivery\General

    This subkey may already contain one or more entries for one or more JVM arguments, called jvmarg1, jvmarg2 and so on.

  2. Create entries for two new JVM arguments. For example, if the subkey has no entries yet, add two entries called jvmarg1 and jvmarg2; if the subkey already has entries jvmarg1 through jvmarg4, add entries called jvmarg5 and jvmarg6.
  3. Set the first entry you added to the value -Xdebug.
  4. Set the second entry you added to the value -Xrunjwdp:transport=dt_socket,server=y,address=PORT,suspend=n,onuncaught=n, where PORT should be a number either in the 5000s or in the 8000s.
  5. Alternatively, you can configure these settings in a configuration file called jvm.xml (this does not work for the Transport Ser vice or the Monitoring Service). If you do not yet have such a file set up, first copy the file jvm_sample.xml from the Content Delivery\resources\configurations\ folder of your SDL Tridion installation media to the configuration directory of your Server Role, and rename it to jvm.xml
  6. Open jvm.xml for editing and find the <VirtualMachines> section, which contains an <Options> section. Inside this section, add the following:
    <Option Name="-Xdebug" />
    <Option Name="-Xrunjwdp:transport=dt_socket,server=y,address=PORT,suspend=n,onuncaught=n" />
  7. Save and close jvm.xml and restart your Web application or Windows service.
  8. If you use Eclipse, refer to the following forum post for more information about how to get debugging up and running for your specific Web application server: