cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging Alfresco Tomcat with Eclipse

kirit
Champ on-the-rise
Champ on-the-rise
Hi,
I want to setup the Debugging for my Alfresco project with Eclipse, how can i do this?
29 REPLIES 29

jzaruba
Champ in-the-making
Champ in-the-making
Hi,

Pls follow the link.It is very cleear for building the code from SVN(http://forums.alfresco.com/en/viewtopic.php?f=10&t=15336).

I have read that one (and couple of others)… The thing is that Ant 'yells' at me that some script is intended for Tomcat 6 only. Also I'd rather use current version.
Also I'm not sure whether ImageMagick is required on Windows, judging by this message from mrogers.

Also see some help here (http://www.betaquest.com/2010/07/tutorial-installing-alfresco-community-3-3g-on-centos-5-5-x64-with-...)

catalina.bat and catalina.sh you will find in TOMCAT/bin folder.

bin/:
- bootstrap.jar
- tomcat6.exe
- tomcat6w.exe
- tomcat-juli.jar

As per my understanding on "debugging in Eclipse" means your codebase and the developement enc,servers in one machine.
Remote debugging means your server is in remote and dev env in some other machine.

Thanks. The only possible limitation I can think of is that with remote debugging I might not be able to restart the server…? But I guess that shouldn't be a problem either, so basically there is no significant difference between those two…?

pp20218
Champ in-the-making
Champ in-the-making
I am not sure which Tomcat bundle you are using.
I saw my tomcat's bin folder containing catalina.sh. Have you taken any tomcat.exe file and installed? Pls check it is installed properly and you can able to see tomcat's home page.

Also I have worked only on Linux,so I dont have much idea on Windows. Also, I saw the below link(http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment#Extracting_and_building) explictly stating Imagemagick for Unix.

If you have your dev env,eclipse and the server in one machine, better you do the server configuration instead of Remote debugging.
There is no difference but the different way of debugging  :lol:

Hope these helps.

jzaruba
Champ in-the-making
Champ in-the-making
Thanks for your replies.

I have installed Tomcat from the installer and also I have downloaded the zip-archive for virtual Tomcat. (Which purpose I don't have the slightest clue about.)
Now I'm looking into the zip-archive, and it actually contains catalina.sh.

If you have your dev env,eclipse and the server in one machine, better you do the server configuration instead of Remote debugging.
There is no difference but the different way of debugging  :lol:
Yes, I would actually prefer running/debugging in Eclipse rather than the remote debugging.

One of the things I don't understand is where does Eclipse get the information about what application should it create within its Tomcat-instance… :?

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,

I'am using Eclipse from Windows XP. Can we use a remote Linux Alfresco and debug it ? Is it work ?

Actually I start the Windows Alfresco to debug on the same machine…

Thank you

(Alfresco 3.4d)

jzaruba
Champ in-the-making
Champ in-the-making
I have Eclipse installed on Windows Vista 64bit, and I do remote debugging of Alfresco that runs on Linux (10km from here Smiley Happy without any problems.

dranakan
Champ on-the-rise
Champ on-the-rise
How do you modify the catalina.sh ? I can't get the log : "Listening for transport…" when I restart the server.

I have installed the Alfresco 34d on RHEL
I have modified the catalina.sh like this (http://forums.alfresco.com/en/viewtopic.php?f=10&t=16023#p100331)
Restart "service alfresco restart"
My eclipse is working (connection with another Alfresco installation)
No message in the log during the startup (and eclipse can't connect it)

jzaruba
Champ in-the-making
Champ in-the-making
I did not modify catalina.sh at all.

I've changed one line in startup.sh from
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
to
exec "$PRGDIR"/"$EXECUTABLE" jpda start "$@"

dranakan
Champ on-the-rise
Champ on-the-rise
Thank you 🙂

All is working great !!!

By default, the connection is to the port 8000… see catalina.out to know on which port to connect from Eclipse…

"Listening for transport dt_socket at address: 8000"

jzaruba
Champ in-the-making
Champ in-the-making
i'm glad i could help Smiley Happy

patil
Champ on-the-rise
Champ on-the-rise
1.   Navigate the folder where alfresco is been installed in the Command prompt.
Cd D:\Installs\alfrescoServer\tomcat\bin
2.   Now run the below command
.\tomcat7w.exe //ES//alfrescoTomcat
4.   In this open the tab Java and add the below values in the Java options
-Xdebug
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
5.   Click Apply and OK. By doing this we have made service aware of debugging.
6.   Restart the alfresco server.
7.   In Eclipse Connect to the remote application by configuring the port 8000
8.   Click on Debug and Happy debugging 

Thanks,
Patil