1

How to remote debug the supporting jars (projects) ,which are present in the lib directory of the main project

I am trying to debug a project which is used to support the main project ,and is present in the lib folder of the bin directory We are not able to do so ,as on trying to do it.The breakpoints in the supporting project is never hit. The breakpoints in the core project is hit .But for plugin it is always looking in the remote system itself and does not reach the source code in

Project Structure on the remote machine enter image description here

Remote debug config : Project is selected as core Source contains both the projects -- core and plugin

I have also tried debugging as Java application .In this case also we see the same behavior i.e plugin breakpoints are not hit.

Malay
  • 55
  • 1
  • 1
  • 4

1 Answers1

1

In order to be able to step into source code, you have to ensure that any such 3rd party library has a source code jar with it!

Most libraries come with class files only! In order to get the debugger to show source code, you have to acquire the corresponding source code jar and include that in your library definition.

See Attach the Source in Eclipse of a jar for more information for example.

Or you use intellij which is able to decompile when no source files are specified.

GhostCat
  • 137,827
  • 25
  • 176
  • 248
  • Added the library to the Build Path and attached the source jar to it.Still the same result. – Malay Dec 17 '18 at 15:26
  • That is strange. I think you should enhance your question then, and probably show us your project setup, and such things. On the other hand, this sounds really strange. In the end, we need a [mcve] to help. – GhostCat Dec 17 '18 at 15:39
  • 1
    Ok.I will try to provide the example too.In the meantime , my problem is almost same as https://stackoverflow.com/questions/53067248/eclipse-remote-debug-jar-files-inside-a-larger-java-application?rq=1, except the fact that I have the complete code and not just a part of it.Do you also agree to the solution provided -- that the best way to know is by unit tests and not debugging. – Malay Dec 18 '18 at 10:20
  • 1
    Right, I kinda overlooked the *remote* aspect here. That link you just gave looks correct to me. – GhostCat Dec 18 '18 at 10:25