Wednesday, May 26, 2010

Remote Debugging Java packages in WSO2 Carbon using IntelliJ IDEA


Here I'm going to tell you an easy way of debugging java packages deployed under any WSO2 product. So, you don't need to go wondering and go through thousands of lines looking what the bug was in your package.
What you need:
  • IntelliJ IDEA
Thats it. Now, open your Java package/bundle from IDEA.
Then, go to Run -> Edit Configurations
Add a remote debug configuration by clicking on '+' sign (at top left corner) and then remote.
It comes with a default set of settings. Keep them intact. get to know the port number(generally it's 5005)


Now, start the WSO2 Product you are using with the parameter of debug followed by the port number.
sh wso2server.sh debug 5005

It waits and listens on port 5005 until remote debugging client is started. Start the client by, (in IDEA)
Run -> Debug
All done. Now you can do normal debugging by putting break-points in your .java files.

That's how I got it done. Does this help you to succeed in remote debugging?

5 comments:

  1. Nice article ,Remote Debugging was the single most feature which is very useful while developing larget enterprise application, specially
    if your applicaiton is live and you don't have proper development environment setup in your dev box.

    Thanks
    Javin
    How to setup remote debugging in Eclipse

    ReplyDelete
  2. hi, i installed Ubuntu Enterprise cloud so how to install the Wso2 carbon on it using proper steps.
    Thanks for help in advance.

    ReplyDelete
  3. Krimit,
    It should be quite same as how you use Amazon EC2 instance. There are several articles available on how to do that.

    Installing Carbon is quite straight-forward. Is that what you want or are you trying to install Stratos in the Ubuntu Enterprise Cloud?

    http://wso2.org/library/tutorials/operating-wso2-amazon-ec2-cloud-instances-command-line

    ReplyDelete