Set up the Debugger with Eclipse

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.

description

Debug Eclipse; set up;

Transcript of Set up the Debugger with Eclipse

Page 1: Set up the Debugger with Eclipse

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: Set up the Debugger with Eclipse

1. Click Run Run…

Page 3: Set up the Debugger with Eclipse

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

Page 4: Set up the Debugger with Eclipse

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

Page 5: Set up the Debugger with Eclipse

1. Name: tomcat

2. Project: ext

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

Page 6: Set up the Debugger with Eclipse

1. Click the Arguments tab

2. Program arguments: start

3. VM arguments: (See Next Slide)

Page 7: Set up the Debugger with Eclipse

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: Set up the Debugger with Eclipse
Page 9: Set up the Debugger with Eclipse

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: Set up the Debugger with Eclipse

1. Click the ClassPath tab

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

Page 11: Set up the Debugger with Eclipse

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: Set up the Debugger with Eclipse

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: Set up the Debugger with Eclipse

1. Click Apply Run

Page 14: Set up the Debugger with Eclipse

Congratulations!

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

Page 15: Set up the Debugger with Eclipse

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: Set up the Debugger with Eclipse

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: Set up the Debugger with Eclipse

Revision HistoryEdward Shin 09/08/06 Author