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
- To configure remote debugging in the Windows registry, access or create the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Tridion\Content Delivery\GeneralThis subkey may already contain one or more entries for one or more JVM arguments, called
jvmarg1,jvmarg2and so on. - Create entries for two new JVM arguments. For example, if the subkey has no entries yet, add two entries called
jvmarg1andjvmarg2; if the subkey already has entriesjvmarg1throughjvmarg4, add entries calledjvmarg5andjvmarg6. - Set the first entry you added to the value
-Xdebug. - 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. - 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
- 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" /> - Save and close jvm.xml and restart your Web application or Windows service.
- 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: