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 / April 2007

Tip: Looking for answers? Try searching our database.

Eclipse: how to set breakpoint on library JAR source?

Thread view: 
davout - 05 Apr 2007 08:06 GMT
In my Eclipse Java project I have an exception occuring inside one of the
external JAR files that make up the project (apache commons-validator).

I've downloaded the commons-validator source and in the Eclipse IDE linked
the source path to the JAR file so that I can now see where the exception is
occuring inside this JAR.

However, I can't set breakpoints on this JAR source that actually work. The
IDE allows me to toggle the breakpoint entry on selected lines but the
breakpoint isn't used as when run the application skips past it.

Simply put, how can I temporarily include the source code of an external
library JAR into my project so that I can debug/trace problems using
breakpoints?
Diego Guidi - 05 Apr 2007 08:29 GMT
> In my Eclipse Java project I have an exception occuring inside one of the
> external JAR files that make up the project (apache commons-validator).
[quoted text clipped - 10 lines]
> library JAR into my project so that I can debug/trace problems using
> breakpoints?

Your operations are correct, and the breakpoint must work.
Maybe the source does not match the jar version? In this case what you
view is not what happen in the code
Oliver Wong - 05 Apr 2007 23:44 GMT
> In my Eclipse Java project I have an exception occuring inside one of
> the external JAR files that make up the project (apache
[quoted text clipped - 11 lines]
> library JAR into my project so that I can debug/trace problems using
> breakpoints?

   In the way that you'd probably expect: Delete the jar, add the source
code files to your project, debug. When done, delete the source code
files, re-add the jar.

   As Diego mentions, the problem is probably that your JAR and source
don't match up, but if the problem is with your code (e.g. passing in an
illegal parameter or something), hopefully the same exception will be
thrown despite the version difference.

   - Oliver


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



©2009 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.