1) Open the "....\liferay-portal-6.1-.....\tomcat\bin\catalina.bat" file (for windows)
2) Search for "DEBUG_OPTS" and replaced whole line with below content
set DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
3) Start tomcat with "....\liferay-portal-6.1-.....\tomcat\bin\startup.bat"
4) Inside Liferay IDE/Eclipse go to "Run" -> "Debug Configurations..."
5) Go to "Remote Java Application" and double click on it
6) Give "Name" : "xyzportlet-debug"
7) Project : "Need to select via {Browse} option"
8) Inside "Connection Properties"
"Host" : "localhost"
"Port" : "1044" (which we have specified in "catalina.bat" file)
9) Attach source of the project via "Source" tab of a wizard
10) Click on "Apply" and "Debug"
11) Set the break point in your source code (Point where you want to break the execution and debug)
That is it. We are all set to debug our code. Now, access your code via "Browser" and enjoy debugging.
Cheers!
Henal Saraiya
(Senior Consultant)
CIGNEX Datamatics
2) Search for "DEBUG_OPTS" and replaced whole line with below content
set DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044
3) Start tomcat with "....\liferay-portal-6.1-.....\tomcat\bin\startup.bat"
4) Inside Liferay IDE/Eclipse go to "Run" -> "Debug Configurations..."
5) Go to "Remote Java Application" and double click on it
6) Give "Name" : "xyzportlet-debug"
7) Project : "Need to select via {Browse} option"
8) Inside "Connection Properties"
"Host" : "localhost"
"Port" : "1044" (which we have specified in "catalina.bat" file)
9) Attach source of the project via "Source" tab of a wizard
10) Click on "Apply" and "Debug"
11) Set the break point in your source code (Point where you want to break the execution and debug)
That is it. We are all set to debug our code. Now, access your code via "Browser" and enjoy debugging.
Cheers!
Henal Saraiya
(Senior Consultant)
CIGNEX Datamatics