Bug 36709 - absent line numbers msg when debugging
Summary: absent line numbers msg when debugging
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-21 11:46 EDT by TToyohara CLA
Modified: 2003-06-02 06:13 EDT (History)
1 user (show)

See Also:


Attachments
sample src file (17.76 KB, application/octet-stream)
2003-04-21 11:51 EDT, TToyohara CLA
no flags Details
sample class file (6.44 KB, application/octet-stream)
2003-04-21 11:51 EDT, TToyohara CLA
no flags Details
repackaging of the inital files (12.24 KB, application/octet-stream)
2003-04-21 13:46 EDT, TToyohara CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description TToyohara CLA 2003-04-21 11:46:07 EDT
I was told to submit this here by Olivier Thomann <Olivier_Thomann@oti.com> 
after posting this problem to the newsgroups.

I am having trouble debugging one of my projects.  It's
setup exactly like the other ones I have, but this is the only one that I
cannot debug.

When I try to hit code where i've enabled a breakpoint, i get the error 
msg "Attempting to install
a breakpoint in the type package.name.goes.here that has no line number
attributes.  THe breakpoint cannot be installed.  Class files must be
generated with the line number attributes.

Reason: Absent Line Number Information

I double checked the compiler settings and the Compile with line numbers
option is set to true, so I'm not entirely sure whats going on.

General Steps:
Create new Java project, point it at my source, use all default settings and 
then add the j2ee.jar in the library panel.

i've compiled using the Rebuild All option as well as using ant.  i cleaned out 
all the class files each time just to be sure.

i have the tomcat plugin v2.1 from www.sysdeo.com, which i use to start up 
tomcat and debug my projects.  i click the start tomcat button and the server 
starts up fine, but as soon as i hit the code that im trying to debug, i get 
the error msg.

if you'd like to see a sample src and class file, please email me and i'll pass 
it to you.
Comment 1 TToyohara CLA 2003-04-21 11:51:10 EDT
Created attachment 4650 [details]
sample src file

if you would like the entire source, please let me know
Comment 2 TToyohara CLA 2003-04-21 11:51:58 EDT
Created attachment 4651 [details]
sample class file
Comment 3 Olivier Thomann CLA 2003-04-21 12:56:21 EDT
Could you please submit the .class file again?
But this time, set the MIME type to application/octet-stream.
Right now it is saved as application/java and this corrupts the attachment. I 
will try to see if I can fix it, but it would be better if you could simply 
submit it again.
Thanks.
Comment 4 TToyohara CLA 2003-04-21 13:46:01 EDT
Created attachment 4653 [details]
repackaging of the inital files

here are example src and class files from my project.
Comment 5 Olivier Thomann CLA 2003-04-21 14:08:51 EDT
It appears that the .class file generated doesn't contain any debug attributes.
In this case I need all the dependant classes in order to be able to compile the
source file.
Are you sure that you didn't change the compiler settings for this project?
Check the properties of this project.
1) Select the project
2) Right click>Properties>Java Compiler

Do you have "Use workspace settings" selected? If not, you have "Use project
settings" selected and check the "Compliance and ClassFiles">Classfile
generation options.
Comment 6 Olivier Thomann CLA 2003-04-21 14:09:12 EDT
Add CC'.
Comment 7 TToyohara CLA 2003-04-21 14:50:24 EDT
olivier,

in preparation of sending you a zip of my project, i went through my project 
files and cleaned out all unnecessary files, including some old directories 
that contained remnant class files in an unused directory (WEB-INF/tmp) I am 
certain that there are/were no more references to this dir in my project or in 
my ant build.xml.  I also went into the compiler preferences and UNCHECKED the 
compile with line numbers toggle and clicked APPLY, and then i CHECKED the 
compile with line numbers toggle and clicked APPLY.  I did a REBUILD ALL and 
ran the application once more to make sure everything still worked before 
sending to you. Lo and behold, the debugging started working again.  I cleaned 
out my build folder again and tried compiling with ant, and debugging worked in 
this scenario too.

so, im not sure what the problem was - whether it was the old class files 
sitting around in the workspace or whether i just needed to toggle the switch a 
few times.

if you think this could be more than a fluke, i'd be happy to continue 
providing you with as much information as i can.  please let me know and thanks 
for the support.
Comment 8 Olivier Thomann CLA 2003-04-21 14:54:52 EDT
Close as WORKSFORME. Please reopen if this happens again or if you have better
indication on the nature of the problem.