13

I've written a custom ADF cartridge, but am having problems configuring JuggerNET to allow me to attach a remote debugger to this cartridge.

I've seen these instructions:

http://codemesh.com/products/juggernet/faqs_runtime/faq_debugJava.html

However, I'm not clear how I would configure JuggerNET in this way within the Tridion environment.

Thanks

21

The key is to have the Tridion java wrapper fire up the JVM in debug mode:

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044 -Djava.compiler=NONE -Xnoagent

The rest is business-as-usual remote debugging with Java.

Tridion appears to set jvmLoader.Debug = true; by default. So you should just be able to attach to the java process that Juggernet starts as you would normally without doing anything special for Tridion.

Otherwise, Tridion Content Delivery tries to read a file called jvm.xml in the tridionhome or bin folder (unfortunately it will take a bit more hacking to figure out the format of this file). If Tridion doesn't find this file it looks in the Registry: @Software\Wow6432Node\Tridion\Content Delivery\General for keys that start with jvmarg1, jvmarg2, and so on.

If the keys aren't present it defaults to what I mentioned above.

So you should be able to create a new set of keys and then simply attach to the java process the normal way you would when doing java remote debugging:

jvmarg1=Xdebug
jvmarg2=Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
jvmarg3=Djava.compiler=NONE -Xnoagent

Keep an eye on the log when you start up the app pool as there will be messages logged regarding what keys got loaded or errors if it can't recognize the keys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.