Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 175352

Summary: [Ant 1.7] More eager cleanup after execute --> macrodef stepping problems
Product: [Eclipse Project] Platform Reporter: Darin Swanson <Darin_Swanson>
Component: AntAssignee: Michael Rennie <Michael_Rennie>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Darin Swanson CLA 2007-02-23 14:16:37 EST
Ant has moved to a more eager cleanup of task state for 1.7
This means that on task finished some instance variables we were using for debug support have been nulled out.

This will lead to incorrect stepping into macrodefs.
With the following test file, breakpoint on line 13, debug.
Step Into
Step Into
Step Over

The program resumes to completion.
It should step out of the macrodef.

<project default="type">

	<macrodef name="eclipseMacro">
		<attribute name="v" default="NOT SET" />
		<attribute name="eclipse" default="yes" description="Testing Eclipse"/>
		<element name="some-tasks" optional="yes" />
		<sequential>
			<echo>Eclipse!: @{v}</echo>
		</sequential>
	</macrodef>

	<target name="type">
		<eclipseMacro v="This is v">
			
		</eclipseMacro>
		<eclipseMacro v="This is v2"/>
		<eclipseMacro v="This is v3"/>
		<eclipseMacro v="This is v4"/>
		<eclipseMacro/>
	</target>

</project>
Comment 1 Darin Swanson CLA 2007-03-01 16:17:48 EST
Reworked AntDebugState to handle the new behavior and still work for the old.

We have automated. tests that hit this as well.
Comment 2 Darin Swanson CLA 2007-03-01 16:19:36 EST
Please verify.
Comment 3 Michael Rennie CLA 2008-04-30 13:17:28 EDT
verified