Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 155082 - Legal Breakpoint Locations in an Ant Sccript
Summary: Legal Breakpoint Locations in an Ant Sccript
Status: RESOLVED DUPLICATE of bug 80654
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-24 14:11 EDT by Simon Archer CLA
Modified: 2006-08-24 14:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Archer CLA 2006-08-24 14:11:11 EDT
Unfortunately, breakpoints can only be set on very particular lines in an Ant script.

Consider the following test script.  I placed breakpoints on every line within the <project> element.  The script has been annotated to show the lines at which the debugger stopped and did not stop.

  <project name="test" basedir="." default="build">
+   <target name="build">
-     <echo
-       message="Hello"
-       level="info"
+     />	
+     <echo>
-       Hello
-     </echo>
-   </target>
  </project>


- A '+' at the start of the line indicates that the debugger stopped at the 
  breakpoint.

- A '-' at the start of the line indicates that the debugger did not stop at
  breakpoint.


Consider this portion:

-     <echo
-       message="Hello"
-       level="info"
+     />	


It is unfortunate that the only breakpoint that works is on the closing tag, "/>".  I would have hoped that a breakpoint on the opening tag, "<echo", would also work.

Consider this portion:

+     <echo>
-       Hello
-     </echo>


In this case the reverse is true. You can set a breakpoint on the opening tag, "<echo>", but not on the closing tag, "</echo>".

It would seem reasonable that if a breakpoint is set within an element that the debugger stops before executing the task described by the element.

It is also worth noting that there is no visual clue that a breakpoint is valid or not.  When attempting to place a breakpoint on an illegal line in the Java editor the breakpoint is automatically moved down to the next legal line.
Comment 1 Darin Swanson CLA 2006-08-24 14:16:46 EDT
Currently deferred and not planned for 3.3

*** This bug has been marked as a duplicate of 80654 ***