Return-Path: X-Original-To: apmail-ant-user-archive@www.apache.org Delivered-To: apmail-ant-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 64331EB09 for ; Mon, 21 Jan 2013 21:10:08 +0000 (UTC) Received: (qmail 67645 invoked by uid 500); 21 Jan 2013 21:10:07 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 67555 invoked by uid 500); 21 Jan 2013 21:10:07 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 67547 invoked by uid 99); 21 Jan 2013 21:10:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2013 21:10:07 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of antoine@gmx.de designates 212.227.15.18 as permitted sender) Received: from [212.227.15.18] (HELO mout.gmx.net) (212.227.15.18) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2013 21:09:59 +0000 Received: from mailout-de.gmx.net ([10.1.76.33]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MGlZv-1TjuEN2P7h-00DXsg for ; Mon, 21 Jan 2013 22:09:38 +0100 Received: (qmail invoked by alias); 21 Jan 2013 21:09:38 -0000 Received: from pool-72-89-106-218.nycmny.east.verizon.net (EHLO [192.168.1.72]) [72.89.106.218] by mail.gmx.net (mp033) with SMTP; 21 Jan 2013 22:09:38 +0100 X-Authenticated: #22961642 X-Provags-ID: V01U2FsdGVkX1/dQw1iGc3dc0XTiVpl7Ksi3c3ytL+/R7k99koSxd Cl5NsFzZSXm6fG From: Antoine Levy Lambert Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_84625867-E41C-422A-929D-F520B441FE44" Subject: Re: How to debug ant source inside RAD / Eclipse Date: Mon, 21 Jan 2013 16:09:34 -0500 In-Reply-To: <0B11A18CD17F5F45A861D1D21D9A3073458731EA@TJAXP80097DAG.csxt.ad.csx.com> To: "Ant Users List" References: <0B11A18CD17F5F45A861D1D21D9A3073458731EA@TJAXP80097DAG.csxt.ad.csx.com> Message-Id: <037303B3-9178-4450-8917-6EC6838D37AD@gmx.de> X-Mailer: Apple Mail (2.1283) X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail=_84625867-E41C-422A-929D-F520B441FE44 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii If you want to debug the source code of Ant or of custom Ant tasks that = you develop and you are using Eclipse or RAD. here is what you can do. Ant can be started as an "External Tool". In the External Tools = Conifgurations dialog box, you can create an "Ant Build" build = configuration, selecting the build file that you want to run and the = target.=20 In order to be able to debug the source code of Ant or of your custom = tasks, you want to open the JRE tab and enter VM arguments, for instance = these : -Xdebug = -agentlib:jdwp=3Dtransport=3Ddt_socket,server=3Dy,suspend=3Dy,address=3D80= 00 The suspend=3Dy option in the VM arguments means that the Ant VM will = wait on you starting debugging to run. You then create in the menu Run/Debug a debug configuration using the = same port 8000. See for instance this link [1] or [2] concerning remote = debugging. You will want to create an Eclipse project "Ant" inside = Eclipse and put this project on the class path of your debug = configuration so that you can put breakpoints inside the code of Ant and = actually hit these breakpoints. Once you have setup both your external tool configuration and the remote = java debug configuration, you need to first kick off the external tool = configuration. Because of "suspend=3Dy" it is going to hang for a short = time until you activate the "remote" debugging configuration. Once the = remote debugging configuration is started and you see the message saying = something like VM connected on port 8000 you will be able to debug the = code of Ant. Eclipse can also debug Ant build files since Eclipse 3.1 according to = this document [3]. Which links also to this one [4] titled "Make Ant = easy with Eclipse" Regards, Antoine [1] = http://www.ibm.com/developerworks/java/library/os-eclipse-javadebug/index.= html [2] = http://javarevisited.blogspot.com/2011/02/how-to-setup-remote-debugging-in= .html [3] http://www.eclipsezone.com/eclipse/forums/t71656.html [4] = http://www.ibm.com/developerworks/opensource/tutorials/os-ecl-easyant/ On Jan 20, 2013, at 6:29 PM, WebServices Development wrote: > Is there a way to debug ANT source by using it to build inside = Rational Application Developer ( RAD ) or Eclipse? >=20 > I have downloaded the ANT 1.8.4 source and did a build in RAD using = the build.xml which created the ant jar files. I then tried to create a = launcher using these built jar files, but I am unable to put a = breakpoint in them. Ami missing something or am I going about it the = wrong way? >=20 > Is there a way to run an ANT build in RAD using these ANT jar files = and set a break-point? >=20 > Thank you. >=20 >=20 --Apple-Mail=_84625867-E41C-422A-929D-F520B441FE44--