Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 410592 - breakpoints in Java code don't hit
Summary: breakpoints in Java code don't hit
Status: CLOSED FIXED
Alias: None
Product: Xtend
Classification: Tools
Component: Core (show other bugs)
Version: 2.4.2   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 383441 (view as bug list)
Depends on: 442500
Blocks:
  Show dependency tree
 
Reported: 2013-06-12 09:06 EDT by Moritz Eysholdt CLA
Modified: 2017-10-31 11:24 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Eysholdt CLA 2013-06-12 09:06:31 EDT
If you set a breakpoint in Java code that has been generated by an active annotation the debugger will never stop at that breakpoint, even though the corresponding Java statement is executed. 

I assume this is because there are not line mappings to Xtend code for that Java line.
Comment 1 Stefan Oehme CLA 2014-07-16 09:15:22 EDT
The line information is missing because the expressions have no source element. 

With the new Associator#setPrimarySourceElement the situation has at least somewhat improved since you can now set breakpoints on the signatures of methods/constructors.
Comment 2 Stefan Oehme CLA 2014-07-17 02:38:21 EDT
This is not limited to active annotations. Many breakpoints in the Java code are not hit.

package foo

class Foo {
	
	def static void main(String[] args) {
		println(new Foo().getBar())
	}
	
	def getBar() {
		"bar"
	}
}

Set a breakpoint in the getBar() method in the generated Java code and debug the main method. It doesn't stop.
Comment 3 Stefan Oehme CLA 2014-08-25 10:50:19 EDT
*** Bug 383441 has been marked as a duplicate of this bug. ***
Comment 4 Stefan Oehme CLA 2015-12-11 09:36:03 EST
This was fixed in JDT in Mars.
Comment 5 Eclipse Webmaster CLA 2017-10-31 11:24:13 EDT
Requested via bug 522520.

-M.