javaeclipsedebuggingtestng-eclipse

Eclipse - Debug as - TestNG Test: fails to find the test source code


I am trying to debug a unit test running testng in Eclipse. I put a breakpoint in the code and when it reaches that point Eclipse complains that it can not find the source code for the unit test!

I had experience this issue in the pass but this was always because external projects that i had not downloaded the sources locally. However, this is something entirely different. Eclipse is not even able to find the source for the project where the unit test is defined.

However, when i attached the project using the "Edit Source Lookup Path", I am able to see the source code.

EDIT:

After some investigation I can say that:

Eclipse --> Debug As -> Java Application works and finds the source code.

So this issue seems to be related to TestNG Test launch


Solution

  • The description and solution to this issue and a solution can be found here:

    https://github.com/cbeust/testng-eclipse/issues/490