Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
a g
how to debug liferay in eclipse
November 23, 2012 2:06 AM
Answer

a g

Rank: Expert

Posts: 409

Join Date: March 2, 2012

Recent Posts

Hi All,

I have Installed liferay-portal-6.1.0-ce-ga1 & liferay-plugins-sdk-6.1.0-ce-ga1
And using Tomcat Server - tomcat-7.0.23
Eclipse-IDE

How to setup debugger for Liferay in the Eclipse-IDE.

Regards
Anand
a g
RE: how to debug liferay in eclipse
November 23, 2012 2:34 AM
Answer

a g

Rank: Expert

Posts: 409

Join Date: March 2, 2012

Recent Posts

Hi,

can i follow below url for my enviornment:. Please confirm

http://www.liferay.com/web/raymond.auge/blog/-/blogs/debugging-liferay-in-eclipse
Hitoshi Ozawa
RE: how to debug liferay in eclipse
November 24, 2012 4:40 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Yes and use Liferay IDE.
Nikhil Nishchal
RE: how to debug liferay in eclipse
November 24, 2012 6:31 AM
Answer

Nikhil Nishchal

Rank: Regular Member

Posts: 136

Join Date: June 21, 2012

Recent Posts

If requirement i related to debug only then:
you can go through steps:
1. add liferay source in eclipse
> Please add source of same version of SDK and server (you can get through http://sourceforge.net/projects/lportal/files/ )
2. mark breakpoints
3. start server in debug mode.
and go through debug mode and debug you code emoticon
Peter Hancox
RE: how to debug liferay in eclipse
January 17, 2013 6:51 PM
Answer

Peter Hancox

Rank: Junior Member

Posts: 33

Join Date: July 5, 2005

Recent Posts

I too am interested in setting up Eclipse for both plugin development and debugging portal core code.

First step was to setup the standard Liferay Eclipse IDE (1.6.1) environment which I did by downloading the eclipse_Liferay_IDE_1.6.1.v201211020947-win32-x86_64.zip package as a starting point. This all appears to work fine for plugin development though all I've really used it for is upgrading one of our older themes.

Importing the Liferay 6.1.1 source into Eclipse as a project and adding this project to the "Source Lookup Path" on the launch configuration allows me to set breakpoints, view variables, etc. However, changes made to the code are not deployed to the running portal instance.

If I follow the instructions at http://www.liferay.com/web/raymond.auge/blog/-/blogs/debugging-liferay-in-eclipse then changes made to the source are hot-deployed but not persisted. i.e., The Eclipse project sets it's output folder to "portal-trunk/bin" whereas Tomcat appears to be loading the class files from the same directory as the source files. Hence changing the source does hot-deploy and updates the class file under "/portal-trunk/bin" but on the next restart, Tomcat loads the class file from the source directory and any changes require touching the source file so they are hot-deployed again. Obviously also limited to changes that can be hot-deployed.

It looks as if this procedure may have been a pre-cursor to the current Liferay IDE implementation?

If I start with the standard Liferay Eclipse IDE (1.6.1) package, is it possible to debug the portal source (e.g., WebServerServlet.java) with hot-deploy and also have those changes persisted so that any changes made to the source will still be there after Tomcat server is restarted? If it is possible, what are the required steps?

Any hints or previous experience would be much appreciated.