Fórum

how to debug liferay in eclipse

anand gopalan, modificado 11 Anos atrás.

how to debug liferay in eclipse

Expert Postagens: 442 Data de Entrada: 02/03/12 Postagens Recentes
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
anand gopalan, modificado 11 Anos atrás.

RE: how to debug liferay in eclipse

Expert Postagens: 442 Data de Entrada: 02/03/12 Postagens Recentes
Hi,

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

http://www.liferay.com/web/raymond.auge/blog/-/blogs/debugging-liferay-in-eclipse
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: how to debug liferay in eclipse

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Yes and use Liferay IDE.
thumbnail
Nikhil Nishchal, modificado 11 Anos atrás.

RE: how to debug liferay in eclipse

Regular Member Postagens: 177 Data de Entrada: 22/06/12 Postagens Recentes
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
thumbnail
Peter Hancox, modificado 11 Anos atrás.

RE: how to debug liferay in eclipse

Junior Member Postagens: 45 Data de Entrada: 06/07/05 Postagens Recentes
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.