Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Debugging
Debugging [message #180600] Thu, 16 November 2006 15:40 Go to next message
Eclipse UserFriend
Originally posted by: werner.hti-systems.co.za

Hi,

Let's say I am running and debugging Project1 that references Project2 and
Project3.

Now when setting a breakpoint in the .java file of Project2 or Project3,
the debugger correctly breaks on that breakpoint but not in the source
file, it opens the .class file of the project, still being able to see the
source, but when trying out debugging features like inspecting an object
etc. eclipse complains that it needs references to other dependencies that
I've got referenced anyway...

Note this only happens when it opens the .class file for debugging. In
other instances it correctly breaks in the .java file and all works well.

I think it will help if someone can explain to me why eclipse sometimes
opens the .class file when debugging instead of the .java file, even
though all the dependancies / references are in place and got their source
attached.

Thanks
Re: Debugging [message #180616 is a reply to message #180600] Thu, 16 November 2006 16:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse4.rizzoweb.com

Werner Kok wrote:
> Hi,
>
> Let's say I am running and debugging Project1 that references Project2
> and Project3.
>
> Now when setting a breakpoint in the .java file of Project2 or Project3,
> the debugger correctly breaks on that breakpoint but not in the source
> file, it opens the .class file of the project, still being able to see
> the source, but when trying out debugging features like inspecting an
> object etc. eclipse complains that it needs references to other
> dependencies that I've got referenced anyway...

It sounds like you might have a JAR(s) of the classes for Project2
and/or Project3 on the build path for Project1 (or on the runtime
classpath of your launch configuration). Since the projects already
depend on each other, you don't need the JAR. Eclipse may be seeing the
JAR before the project dependency, and thus is opening the class file
fro the JAR instead of the source file from the project.

Hope this helps,
Eric
Re: Debugging [message #180721 is a reply to message #180616] Fri, 17 November 2006 05:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: werner.hti-systems.co.za

Hi Eric, thanks for replying.

I've double checked and only the classes folder for Project2 and Project3
are referenced, no Jars. What I've seen though is in the launch
configurations "Source" tab, the source folders for Project2 and Project3
was not listed. I would have thought it would be listed automatically by
linking the source folder to the classes reference in the project but it
does not. So I've added it to the launch configurations "Source" tab and
it works fine now.

Thank you,
Werner
Re: Debugging [message #180783 is a reply to message #180721] Fri, 17 November 2006 17:47 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse4.rizzoweb.com

Werner Kok wrote:
> Hi Eric, thanks for replying.
>
> I've double checked and only the classes folder for Project2 and
> Project3 are referenced, no Jars. What I've seen though is in the launch
> configurations "Source" tab, the source folders for Project2 and
> Project3 was not listed. I would have thought it would be listed
> automatically by linking the source folder to the classes reference in
> the project but it does not. So I've added it to the launch
> configurations "Source" tab and it works fine now.

Is your Launch config based on Project1 or Project2 or Project3?
When a launch path references a Project, the source and compiled code is
automatically included; you don't generally need to add them explicitly.
It sounds as if either your launch config or your project dependency is
not quite right, because this is something that "just works" under
normal circumstances.
You could try creating a new launch from scratch to see if it gets
things right without requiring your manual intervention.

Hope this helps,
Eric
Previous Topic:Eclipse v3.2 Search Failure
Next Topic:CVS Merge Problem
Goto Forum:
  


Current Time: Fri Apr 26 04:48:37 GMT 2024

Powered by FUDForum. Page generated in 0.11449 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top