Remote Debugging with Eclipse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2006 03:19 AM
Thanks!
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2006 08:25 PM
To configure Eclipse to debug alfresco you need to do the following:
Assumption: You're using Tomcat to run Alfresco.
In Eclipse click on Run -> Debug
Under Java Application add a New Configuration and call it Tomcat or something.
Main Tab:
Under Main class put org.apache.catalina.startup.Bootstrap
Arguments Tab:
Under Program arguments put start
Under VM arguments put
-Xms128m -Xmx512m -Dfile.encoding=UTF8 -Duser.timezone=GMT-Djava.security.auth.login.config=PATH_TO_TOMCAT/conf/jaas.config-Djava.endorsed.dirs=PATH_TO_TOMCAT/common/endorsed-Dcatalina.base=PATH_TO_TOMCAT-Dcatalina.home=PATH_TO_TOMCAT
Make sure to replace PATH_TO_TOMCAT with the full path to your tomcat installationUnder Working directory choose Other and put the path to your tomcat installation
Classpath Tab:
Under Classpath delete everything under User Entries and click on Add External JARs then browse to your tomcat/bin folder and choose bootstrap.jar
Also click on Add Projects and add the project you want to debug (e.g. repository, or your extension project)
Source Tab:
Under Source Lookup Path click on Add -> Java Project and add the project(s) you're trying to debug
Click Apply then Debug and you should be good to go.
Please note that these steps are how I work and are by no means the exact steps to configure all development environments.
Hope this helps,
–Aladdin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2006 12:43 PM
Thx for this post its very helpful !
I have just a question, it seems that when i run tomcat with eclipse, alfresco dont read config files in extension directory !
But if run tomcat in standalone its working well i have my extension working.
Have you same problem ?
Thx in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2006 08:05 PM
I'm not facing this issue. I have extensions in <TOMCAT_HOME>/shared/classes/alfresco/extension and everything in there is being picked up by Alfresco.
Is that where you placed your extensions?
You could also package your extensions inside a JAR file and deploy that in the WEB-INF/lib folder inside alfresco.war. An example on how to do that is illustrated in the samples that come with the Alfresco SDK.
Hope this helps.
–Aladdin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2006 03:44 AM
By any chance do you have similar steps for JBoss.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2006 04:57 AM
For JBoss your best bet would be to download the JBoss IDE Eclipse plugin:
http://docs.jboss.com/jbosside/install/build/en/html/installation.html
Then follow these instructions to add your appserver and the source you want to debug:
http://docs.jboss.com/jbosside/tutorial/build/en/html/jboss.config.html
Hope this helps.
–Aladdin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2006 11:11 PM
How did u fix this issue, I am facing the same problem
Thanks
Mohamed
Hi,
Thx for this post its very helpful !
I have just a question, it seems that when i run tomcat with eclipse, alfresco dont read config files in extension directory !
But if run tomcat in standalone its working well i have my extension working.
Have you same problem ?
Thx in advance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2007 10:25 AM
I have experienced problems when debugging Alfresco with your configurations.
All spaces with some accents (é, è, à, …) in their name are unaccessible in CIFS (although still accessible in web UI).
Remove the following VM argument from your launch configuration for correct behaviour (at least on Windows XP).
-Dfile.encoding=UTF8
Denis

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2007 06:33 AM
I am not sure if this is what you want, but maybe it will give you some insights.
I myself have an standalone deployment of alfresco upon a tomcat server (the default you can download).
When I create/modify java files I package these with ant and deploy them to the server.
To debug this, I have added the following arguments to my alfresco startup file (either your alf_start.bat or alfresco.sh)
JAVA_OPTS='-Xms128m -Xmx512m -server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044'
This ensures that you will be able to remotely suspend/debug the tomcat instance.
As client in my debugging, I use Eclipse. I have imported all projects from the repository so that I can see in all detail possible what is going on side by side with the code.
To enable debugging remotely in Eclipse you should do the following:
1. in the menu -> run -> open debug dialog.
2. click om "remote java application".
3. create a new entry here.
4. selecteer als project "web-client"
5. server = localhost
6. port 1044
Now you can start debugging from withing Eclipse upon your remote Alfresco installation.
regards,
Marc
http://www.wowww.nl

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2007 06:08 AM
Dont forget to alter the portnumber otherwise it will conflict with your other debug setting.
Kind regards,
Marc
http://www.wowww.nl
