« Integrating with Oracle 11i: Figuring Out the APIs | Main | The World is Flat: A Book Review »

May 10, 2005

Running/Debugging JBoss within IntelliJ IDEA

I usually use Orion, and find debugging it from within IntelliJ is great for debugging. You can set breakpoints in EJBs or other server side code, start it with the Debug button and then wait for your breakpoints to be reached. You can then evaluate expressions, recompile classes and so on.

I set out to do the same thing with JBoss, which I am using for my current project and got it working. It works even better than Orion, because Orion's classes are obfuscated, whereas JBoss' are not.

Step 1 Create a JBoss module

Open File -> Settings -> Paths and create a new Java module as shown below:


(Click to expand)

Step 2 - Add a new Run/Debug Configuration

Add a configuration as shown below.


(Click to expand)

Note that the VM parameters do not show up fully in the screen shot. Copy and past the following:

 -Xms128m -Xmx512m -Dprogram.name=run.sh -Djava.endorsed.dirs=/convergence/configunit/jboss/lib/endorsed

Using it

  1. Make sure that JBoss is not running on your machine
  2. Open Run -> Debug and select the Application tab. Select JBoss and then click on the Debug button. You should see JBoss' start up messages appearing in the IDEA console.
Update: I had to set this up on a new project and got some errors. After playing with I discovered that it is important to exclude any other modules and classes from the JBoss module. Then it works.

Posted by gluck at May 10, 2005 03:34 AM

Comments

What about the JBoss plugin that exists? It's worked just fine for me...

Posted by: Magnus at May 10, 2005 06:56 AM

 
Buy tadalafil swallow that pill erectile dysfunction forums It`s no secret that buy viagra no script. What Is Viagra Used For are you looking for mail order viagra online looking to control your erection? how to buy viagra. Discount viagra buy viagra no rx.