Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

Eclipse breakpoints

Thread view: 
Lord0 - 02 Feb 2007 10:54 GMT
Hi there,

Usually when using the Eclipse debugger when I add a breakpoint a blue
"dot" icon with a tick appears in the gutter of the source code.
Sometimes though all I get is a blue dot with no tick and the code
does not suspend execution at the breakpoint. Why is this? No warnings
are reported etc. When I examine the properties of the breakpoints
which do not work they appear identical to the breakpoints which work.

I am using, Eclipse 3.2, myEclipse 5.1 with OC4J10g but I have also
had this issue with previous versions of Eclipse, Webtools and
different Appservers.

Cheers

Lord0
Robert Klemme - 02 Feb 2007 11:55 GMT
> Hi there,
>
[quoted text clipped - 8 lines]
> had this issue with previous versions of Eclipse, Webtools and
> different Appservers.

Maybe you set the breakpoint in the wrong source file, i.e. not a source
file attached with your current execution.  This happens sometimes if
classes are not loaded from the project's standard classpath but through
some appserver class loader.

HTH

    robert
Lew - 02 Feb 2007 18:16 GMT
On 02.02.2007 11:54, Lord0 wrote:
>> Usually when using the Eclipse debugger when I add a breakpoint a blue
>> "dot" icon with a tick appears in the gutter of the source code.
>> Sometimes though all I get is a blue dot with no tick and the code
>> does not suspend execution at the breakpoint. Why is this? No warnings
>> are reported etc. When I examine the properties of the breakpoints
>> which do not work they appear identical to the breakpoints which work.

> Maybe you set the breakpoint in the wrong source file, i.e. not a source
> file attached with your current execution.  This happens sometimes if
> classes are not loaded from the project's standard classpath but through
> some appserver class loader.

A similar thing happens to JSPs - you might set breakpoints in both the
deployment directory and the source directory, and Eclipse will try its best
to set both - but if your source version differs from the debug version you
will find it confusing.

Also, some artifacts, especially JSPs and the like, don't map their source
lines all that well to the generated .java file source lines. So what looks
like a source line in your real source isn't actually executable in the
generated source, so it can't actually sustain a breakpoint.

Apropos of Robert's advice, I have sometimes messed up Eclipse's project
properties wherein it loses track of the source or build directories. That can
be by deletion of a directory reference from the build properties, or the
inclusion of more than one. Either way it means that my source files become
"not ... attached with [the] current execution". I am also queasy about
Eclipse's management of inter-project dependencies, so I usually avoid having any.

If you modify source from outside Eclipse's (Web)sphere of influence, make
sure you tell Eclipse to refresh all its files and rebuild before you attempt
to debug again. You may need to restart the test server. On occasion, I've had
to dig into the generated .java-file directory, i.e., where the .java
equivalents of JSPs reside, and manually delete the Eclipse-generated code.

Another possibility may lurk in the project properties. I seem to recall a
checkbox that directs Eclipse to include debugging information, and if that
does exist it could be unchecked.

Sorry to be so vague; it's been a few weeks since I last used Eclipse (or
IBM's commercialized version, WSAD).

- Lew


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.