Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse remote debugging: Unable to install a breakpoint error

 
Lynette Peele
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

I am using Eclipse to debug a remote Java application on a Solaris server and have built the class files using Ant options
<javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" debuglevel="lines,vars,source" optimize="on" />

I ensured that the Eclipse environment had line numbers set on in preferences too (local debugging has never been a problem).

When I launched the JVM, I used these options: java -Xdebug -Xnoagent -Xrunjdwp dt_socket,server=y,address=8000 -Djava.compiler=NONE myApp

The error I get is: Attempting to install a breakpoint in the type Unload that has no line number attribute. Class files must be generated with the line number attributes. I have done some research and it appears that this might be an Eclipse bug. Any work arounds?
 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What options did you specify to javac in Ant? If you passed any -g options (or anything else that alters debug information, this may be having an effect.

I guess it's also worth checking that this particular class is being compiled by Ant rather than using an old .class file - do you blow away your destination directory occasionally and start again from scratch?

Those are some other places to look anyway - I've yet to have a problem with Eclipse remote debugging though I'm on Windows (@ work).


-Tim
 
Bharat Ruparel
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please pay particular attention to the Ant javac task below:

You have to specify debuglevel="lines,vars,source" to get the remote debugging to work right.
Regards.
Bharat

[ edited to add code tags - and &lt; for < ]
[ August 23, 2004: Message edited by: Jeanne Boyarsky ]
 
Nira Shavitt
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had the same problem and I just added the debug option to javac ant task, and it was resolved. just add 'debug="true"' to javac and try again.
As you use Ant for the compilation, the settings of the eclipse does not take effect, this is why you have to add it to ant task explicitly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic