Tuesday, February 14, 2012

Remote Debugging with Mule and Eclipse

One of my projects is still using Mule 2.2.1. I wanted to start it in debug mode so that I can do some remote debugging using Eclipse. I had already spent couple of hours before I could figure it out.


Mule 2.x
It needs a change in wrapper.conf file of Mule. There is a commented line
#wrapper.java.additional.=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005

This line needs to be broken down into four lines one for each Java argument. Make sure it is replaced with proper consecutive number for wrapper.java.additional property in your file. They are 7,8,9 and 10 for me.

wrapper.java.additional.7=-Xdebug
wrapper.java.additional.8=-Xnoagent
wrapper.java.additional.9=-Djava.compiler=NONE
wrapper.java.additional.10=-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005

Make sure line given below is uncommented in Mule executable script  $MULE_HOME/bin/mule or it's counter part in $MULE_HOME/bin/mule.bat for windows
JPDA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"

Mule 3.x
It's easier in case of Mule 3.x. Run mule with debug option $MULE_HOME/bin/mule -debug
By default it listens on port 5005 that can be changed in wrapper.conf
 
Eclipse Debug Configuration  
You can change debug port 5005 if you want and configure same in Eclipse debug configuration as it's explained in my another post Remote Debugging - Tomcat+Eclipse

7 comments:

  1. Thanks, I've been struggling with my Mule 2 for hours before I found your post!

    ReplyDelete
  2. Anonymous12:35 AM

    Spot on with this write-up, I actually feel this web site needs much more attention.
    شركات العزل المائي


    Prokr.org


    Prokr.com


    شركة كشف تسربات المياه بالمدينة


    Albyaan.com


    شركة كشف تسربات المياه بالرياض


    Abozahra.com

    ReplyDelete
  3. Anonymous12:36 AM

    Right here is the perfect website for anybody who would like to understand this topic.

    عقاري جدة
    http://3kary.com/
    شقق مفروشة بجدة
    http://3kary.com/property-status/monthly-apartments-for-rent/
    شقق عزاب بجدة
    http://3kary.com/property-status/apartments-bachelors/

    ReplyDelete

  4. مع المتخصصين لدينا لحلول النقل المصممة خصيصا نحن نقدم لك دائما في شركة نقل عفش بجدة
    الطريق الصحيح. ونتيجة لذلك: تقرير سريع للمشاكل وفترة رد الفعل القصير
    وأفضل الحلول. مع نجاح كلي - يثبت لنا والخدمات التي نقدمها. وسيتم مكافأة ثقتكم! شركة نقل اثاث بجدة باسعار مميزة جدا

    ReplyDelete
  5. المعلومات المقدمة حول أفضل دكتور تجميل انف في مصر قد تم الحصول عليها بالبحث على شبكة الإنترنت من مواقع مختلفة وتقييم بعض المرضى الذين تعاملوا معه ، كما تم الاعتماد على بعض المعلومات المقدمة من جوجل؛ لذلك ينصح موقع تجميلي بالقيام بالمزيد من البحث والتحري بناء على نوع الإجراء التجميلي المراد الخضوع له ونوعيات العمليات التي يقدمها المركز الطبي أو الدكتور بما يتناسب مع حالة الشخص.

    ReplyDelete
  6. كلادينج مطابخ قبل اى شئ يجب فى البداية توضيح ما هي كلادينج مطابخ ؟ كذلك ان نتعرف ونوضح مما تتكون تلك المطابخ ؟ وهل كلادينج مطابخ عملية ام لا لاقت كلادينج مطابخ الكثير من المعجبين على المستوى المحلي اسعار الواح الكلادينج للمطابخ  او اسعار الواح كلادينج اتجه لها كل من هو مقبل على الزواج وأصبحت أيقونة لا غنى عنها فى المطابخ الحديثة للمتزوجين .

    ReplyDelete