2

I'm using Liferay Developer Studio 3.8 and Liferay Portal Tomcat 7.3.1.

I would like to know how can I debug Liferay code, given that the usual Eclipse option as "Watch" or "Inspect" are disabled even starting the server in "Debug mode"?

Also, I cannot use the "Variables" perspective or the "Debug Shell".

Options disabled

Variables disabled

Does somebody know a dummy manual to debug in Liferay?

Thanks in advance.

Edit: The line suggested by Purvesh is already inserted in setenv file.

Following the steps provided by Andre, I still cannot add variables or insert expressions in debug shell. And also, nothing happens with the breakpoints at lines 68 and 69. Remote debugging

2 Answers2

2

You can start your server with catalina.sh jpda start (guess this should works with .bat too). In eclipse run „Remote Application“ Debug. Your debug Port should be 8000 (per default).

Andre Albert
  • 1,386
  • 8
  • 17
0
  1. Add Below line in your setenv.bat/setenv.sh file.

CATALINA_OPTS=%CATALINA_OPTS% -Dfile.encoding=UTF8 -Djava.net.preferIPv4Stack=true

  1. Restart tomcat server.

  2. Set debug configuration and put breakpoints.

  3. Run your application.