Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ant debugging in eclipse

Tags:

I would like to know about the debugging capabilities of ANT using eclipse. Basically I have an ANT build script written by a colleague and I wanted to step through each target to see what are the various tasks that are beings called.

like image 763
Jony Avatar asked Jun 14 '10 18:06

Jony


People also ask

How do I debug an Ant script in Eclipse?

Open the Ant view (Window -> Show view -> Ant). If the build file isn't in the view then you can simply add it. Once added right click on the ant target you want to run and select Debug as -> Ant build. The Debug perspective should open up and the process should stop at your breakpoint where you can step through it.

How do I debug Ant task?

Put your ant task in the build file, run Ant in debug mode, connect your eclipse to the ant process, and it the build will stop at the break points in your Ant task, where you can actually debug your task in the "real" environment.

Does Eclipse support Ant?

The Eclipse platform provides a recent stable version of Ant as a plug-in library. The installed version of the org. apache. ant plug-in can be found in Help > About Eclipse > Installation Details > Plugins.


1 Answers

You can do this in Eclipse with these steps:

  1. Be sure to open your build file in the ANT editor (right click on build file -> Open with -> Ant editor).
  2. Double click in the left margin of your build file where you want breakpoint.
  3. Open the Ant view (Window -> Show view -> Ant).
  4. If the build file isn't in the view then you can simply add it.
  5. Once added right click on the ant target you want to run and select Debug as -> Ant build
  6. The Debug perspective should open up and the process should stop at your breakpoint where you can step through it
  7. Sometimes it is required to set the arguments at the time of debugging. It can be set by selecting: Debug as -> Ant build. And then need to select Arguments. And then values can be entered as: -Dprop.name=property value
like image 59
Ross Avatar answered Oct 18 '22 15:10

Ross