Eclipse Debug Liferay

17
Setting Up the Debugger Copyright © 2000 - 2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission from Liferay, Inc.

Transcript of Eclipse Debug Liferay

Page 1: Eclipse Debug Liferay

Setting Up the Debugger

Copyright © 2000 - 2006 Liferay, Inc.

All Rights Reserved.No material may be reproduced electronically or in print without written

permission from Liferay, Inc.

Page 2: Eclipse Debug Liferay

1. Click Run Run…

Page 3: Eclipse Debug Liferay

1. Select Java Application tomcat. If you do not see tomcat, go to the next slide.

Page 4: Eclipse Debug Liferay

If you were NOT able to select tomcat,• Click Java Application• Click New Configuration

Page 5: Eclipse Debug Liferay

1. Name: tomcat

2. Project: ext

3. Main class: org.apache.catalina.startup.Bootstrap

Page 6: Eclipse Debug Liferay

1. Click the Arguments tab

2. Program arguments: start

3. VM arguments: (See Next Slide)

Page 7: Eclipse Debug Liferay

1. VM arguments:-Xms128m -Xmx512m -Dfile.encoding=UTF8 -Duser.timezone=GMT

-Djava.security.auth.login.config=C:/Training/liferay/tomcat/conf/jaas.config

-Djava.endorsed.dirs=C:/Training/liferay/tomcat/common/endorsed

-Dcatalina.base=C:/Training/liferay/tomcat

-Dcatalina.home=C:/Training/liferay/tomcat

-Djava.io.tmpdir=C:/Training/liferay/tomcat/temp

Warning! Make sure the paths are pointing to your Tomcat directory.

If you unzipped Tomcat to a directory other than C:/Training/liferay/tomcat you must change the paths accordingly.

1. Working directory:

C:/Training/liferay/tomcat

Page 8: Eclipse Debug Liferay
Page 9: Eclipse Debug Liferay

1. Click the JRE tab

2. Make sure that the Project JRE points to the JDK. For example, j2sdk1.4.2_12.If the Project JRE points to the JRE instead of the JDK see the Troubleshooting section.

Page 10: Eclipse Debug Liferay

1. Click the ClassPath tab

2. Remove all entries in Bootstrap Entries except for JRE System Library [jdk]

Page 11: Eclipse Debug Liferay

1. Remove all entries in User Entries

2. Select User Entries, then click Add External Jars

3. Add bootstrap.jar located here:C:/Training/liferay/tomcat/bin

Page 12: Eclipse Debug Liferay

1. Click the Source tab

2. Click Add Java Project

3. Check ext and portal and click OKThese options may not be available if they are already included in the Source Lookup Path window.

Page 13: Eclipse Debug Liferay

1. Click Apply Run

Page 14: Eclipse Debug Liferay

Congratulations!

Congratulations, you can now debug the source code in Eclipse!

Page 15: Eclipse Debug Liferay

Run Tomcat (Debug)

Run Tomcat (No Debug)

Stop Tomcat

Clear all terminated launchesClick to see if more than one instance of

Tomcat is running

Clear console

Page 16: Eclipse Debug Liferay

Troubleshooting

If your Project JRE does not point to the JDK:

1. Click Window Preferences Java Installed JREs

2. Click Add

3. Enter a name for your JDKBrowse for the location of your JDKFor example: C:/Java/jdk1.5.0_08

4. Remove all entries that point to the JRE

Your Project JRE should now point to the SDK

Page 17: Eclipse Debug Liferay

Revision HistoryEdward Shin 09/08/06 Author