Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Debugging example causes "Absent Line Number Information"
Debugging example causes "Absent Line Number Information" [message #27233] Sat, 01 November 2003 07:06 Go to next message
Eclipse UserFriend
Originally posted by: ColinDJones.yahoo.com

I'm attempting to run the tjp.Demo example in debugging mode and am
receiving this error.

Attempting to install a breakpoint in the type tjp.Demo 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 have examined the option to add the line number information and it is
properly checked. It is located at

Preferences->Java->Compiler->Compliance and Classfiles

and the option descripton is

Add line number attributes to generated class files (used by the debugger)

I am using Eclipse 2.1.1 and AspectJ Development Tools version 1.1.4.

Does anyone know what the problem is? I am not getting this error
non-AspectJ projects.

Thank you,
-Colin
Re: Debugging example causes "Absent Line Number Information" [message #27732 is a reply to message #27233] Fri, 07 November 2003 17:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: clemas.uk.ibm.com

Hi Colin,

We know that debugging with AspectJ projects is not perfect. The
restrictions I know about are:

- You can't set breakpoints within aspects - because the eclipse JDT code
that tries to add them cannot parse the structure of an aspect.

- Some kinds of advice is inlined, namely around advice. This means you
will have some source files that contains code that originated from
multiple locations - some code from the original source code for your java
class and some code from the aspect that you have woven into the class -
without proper JSR45 support, the debugger will have problems. (JSR45 is
concerned with mapping class file contents to multiple source files).

However, I havent seen your problem with line number attributes before.
Although the AspectJ compiler does understand many of the preferences for
the normal Java compiler (accessible through Preferences->Java->Compiler),
I dont *think* it respects the 'Add line number attributes to generated
class files' option. I think by default we *do* generate the line number
attributes... Hmmm. You could raise a bug on bugzilla for this, its
something we ought to look at.

Andy.
AJDT Development
Re: Debugging example causes "Absent Line Number Information" [message #30043 is a reply to message #27732] Wed, 28 January 2004 16:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: emmanuel.pirsch.org

Hi,

I have the same problem.

I use AJDT 1.1.4. I'm unable to set a breakpoint in any of my sources
files. Even if some line of code is not advised.

My aspect source files are in project A. In project B I create a .lst
file with all the source from A and B. Note that B is an ejb-jar.

I use MyEclipse to deploy an EAR (thar include B ejb-jar and a JunitEE
war to run my unit tests) on an Weblogic 8 instance (which run in debug
mode within Eclipse). Before adding some aspects, I was compiling with
the eclipse compiler and been able to use the debugger without any problems.

Since I converted the project to an AspectJ project, I've been unable to
set any break point in my code.

I've tried adding the "-g" option to the project/aspectj/non standard
compiler option but it did not changed anything.

Any clues?

The weird thing is that I remember being able to debug some sample
project I'va made when learning AspectJ.

This is very annoying as the productivity that AspectJ can provide is by
far decrease by the lost of productivity of being unable to use the
debugger.

With the added weakness of being unable to package Aspects in .jar and
reuse them in a useful way (if I do that and compile within Eclipse,
then the outline view gives error whenever I expand the "Advised By"
element and I still have the debugger problem), I'm considering not
using AspectJ anymore. That would be a great setback from me as I'm a
strong advocate of AOP (I've been making presentation about AOP to other
developers/architects within our organization) and this is the first
large project (>1 year of development) were we wanted to apply AOP.




ps: I would be very glad to help in the development of AspectJ/AJDT but
I don't have enough free time available right now.


Andy Clement wrote:
> Hi Colin,
>
> We know that debugging with AspectJ projects is not perfect. The
> restrictions I know about are:
>
> - You can't set breakpoints within aspects - because the eclipse JDT code
> that tries to add them cannot parse the structure of an aspect.
>
> - Some kinds of advice is inlined, namely around advice. This means you
> will have some source files that contains code that originated from
> multiple locations - some code from the original source code for your java
> class and some code from the aspect that you have woven into the class -
> without proper JSR45 support, the debugger will have problems. (JSR45 is
> concerned with mapping class file contents to multiple source files).
>
> However, I havent seen your problem with line number attributes before.
> Although the AspectJ compiler does understand many of the preferences for
> the normal Java compiler (accessible through Preferences->Java->Compiler),
> I dont *think* it respects the 'Add line number attributes to generated
> class files' option. I think by default we *do* generate the line number
> attributes... Hmmm. You could raise a bug on bugzilla for this, its
> something we ought to look at.
>
> Andy.
> AJDT Development
>
>
Re: Debugging example causes "Absent Line Number Information" [message #30062 is a reply to message #30043] Wed, 28 January 2004 17:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: emmanuel.pirsch.org

Hi again,

I just wanted to add that hot code replacement is also not working with
an AspectJ project... adding to the loss of productivity.



Emmanuel Pirsch wrote:
> Hi,
>
> I have the same problem.
>
> I use AJDT 1.1.4. I'm unable to set a breakpoint in any of my sources
> files. Even if some line of code is not advised.
>
> My aspect source files are in project A. In project B I create a .lst
> file with all the source from A and B. Note that B is an ejb-jar.
>
> I use MyEclipse to deploy an EAR (thar include B ejb-jar and a JunitEE
> war to run my unit tests) on an Weblogic 8 instance (which run in debug
> mode within Eclipse). Before adding some aspects, I was compiling with
> the eclipse compiler and been able to use the debugger without any
> problems.
>
> Since I converted the project to an AspectJ project, I've been unable to
> set any break point in my code.
>
> I've tried adding the "-g" option to the project/aspectj/non standard
> compiler option but it did not changed anything.
>
> Any clues?
>
> The weird thing is that I remember being able to debug some sample
> project I'va made when learning AspectJ.
>
> This is very annoying as the productivity that AspectJ can provide is by
> far decrease by the lost of productivity of being unable to use the
> debugger.
>
> With the added weakness of being unable to package Aspects in .jar and
> reuse them in a useful way (if I do that and compile within Eclipse,
> then the outline view gives error whenever I expand the "Advised By"
> element and I still have the debugger problem), I'm considering not
> using AspectJ anymore. That would be a great setback from me as I'm a
> strong advocate of AOP (I've been making presentation about AOP to other
> developers/architects within our organization) and this is the first
> large project (>1 year of development) were we wanted to apply AOP.
>
>
>
>
> ps: I would be very glad to help in the development of AspectJ/AJDT but
> I don't have enough free time available right now.
>
>
> Andy Clement wrote:
>
>> Hi Colin,
>>
>> We know that debugging with AspectJ projects is not perfect. The
>> restrictions I know about are:
>>
>> - You can't set breakpoints within aspects - because the eclipse JDT code
>> that tries to add them cannot parse the structure of an aspect.
>>
>> - Some kinds of advice is inlined, namely around advice. This means you
>> will have some source files that contains code that originated from
>> multiple locations - some code from the original source code for your
>> java
>> class and some code from the aspect that you have woven into the class -
>> without proper JSR45 support, the debugger will have problems. (JSR45 is
>> concerned with mapping class file contents to multiple source files).
>>
>> However, I havent seen your problem with line number attributes
>> before. Although the AspectJ compiler does understand many of the
>> preferences for
>> the normal Java compiler (accessible through
>> Preferences->Java->Compiler),
>> I dont *think* it respects the 'Add line number attributes to generated
>> class files' option. I think by default we *do* generate the line number
>> attributes... Hmmm. You could raise a bug on bugzilla for this, its
>> something we ought to look at.
>>
>> Andy.
>> AJDT Development
>>
>>
Re: Debugging example causes "Absent Line Number Information" [message #30088 is a reply to message #30043] Wed, 28 January 2004 18:30 Go to previous message
Eclipse UserFriend
Originally posted by: emmanuel.pirsch.org

Hi Again,

I've looked with "javap -l ..." and I can see that the line number
information is present in the compiled .class files. That's weird!

So it looks like the .class file are OK, but for some reason I cannot
set breakpoint when debugging them... Any idea?


Emmanuel Pirsch wrote:

> Hi,
>
> I have the same problem.
>
> I use AJDT 1.1.4. I'm unable to set a breakpoint in any of my sources
> files. Even if some line of code is not advised.
>
> My aspect source files are in project A. In project B I create a .lst
> file with all the source from A and B. Note that B is an ejb-jar.
>
> I use MyEclipse to deploy an EAR (thar include B ejb-jar and a JunitEE
> war to run my unit tests) on an Weblogic 8 instance (which run in debug
> mode within Eclipse). Before adding some aspects, I was compiling with
> the eclipse compiler and been able to use the debugger without any
> problems.
>
> Since I converted the project to an AspectJ project, I've been unable to
> set any break point in my code.
>
> I've tried adding the "-g" option to the project/aspectj/non standard
> compiler option but it did not changed anything.
>
> Any clues?
>
> The weird thing is that I remember being able to debug some sample
> project I'va made when learning AspectJ.
>
> This is very annoying as the productivity that AspectJ can provide is by
> far decrease by the lost of productivity of being unable to use the
> debugger.
>
> With the added weakness of being unable to package Aspects in .jar and
> reuse them in a useful way (if I do that and compile within Eclipse,
> then the outline view gives error whenever I expand the "Advised By"
> element and I still have the debugger problem), I'm considering not
> using AspectJ anymore. That would be a great setback from me as I'm a
> strong advocate of AOP (I've been making presentation about AOP to other
> developers/architects within our organization) and this is the first
> large project (>1 year of development) were we wanted to apply AOP.
>
>
>
>
> ps: I would be very glad to help in the development of AspectJ/AJDT but
> I don't have enough free time available right now.
>
>
> Andy Clement wrote:
>
>> Hi Colin,
>>
>> We know that debugging with AspectJ projects is not perfect. The
>> restrictions I know about are:
>>
>> - You can't set breakpoints within aspects - because the eclipse JDT code
>> that tries to add them cannot parse the structure of an aspect.
>>
>> - Some kinds of advice is inlined, namely around advice. This means you
>> will have some source files that contains code that originated from
>> multiple locations - some code from the original source code for your
>> java
>> class and some code from the aspect that you have woven into the class -
>> without proper JSR45 support, the debugger will have problems. (JSR45 is
>> concerned with mapping class file contents to multiple source files).
>>
>> However, I havent seen your problem with line number attributes
>> before. Although the AspectJ compiler does understand many of the
>> preferences for
>> the normal Java compiler (accessible through
>> Preferences->Java->Compiler),
>> I dont *think* it respects the 'Add line number attributes to generated
>> class files' option. I think by default we *do* generate the line number
>> attributes... Hmmm. You could raise a bug on bugzilla for this, its
>> something we ought to look at.
>>
>> Andy.
>> AJDT Development
>>
>>
Re: Debugging example causes "Absent Line Number Information" [message #572698 is a reply to message #27233] Fri, 07 November 2003 17:49 Go to previous message
Andrew Clement is currently offline Andrew ClementFriend
Messages: 162
Registered: July 2009
Senior Member
Hi Colin,

We know that debugging with AspectJ projects is not perfect. The
restrictions I know about are:

- You can't set breakpoints within aspects - because the eclipse JDT code
that tries to add them cannot parse the structure of an aspect.

- Some kinds of advice is inlined, namely around advice. This means you
will have some source files that contains code that originated from
multiple locations - some code from the original source code for your java
class and some code from the aspect that you have woven into the class -
without proper JSR45 support, the debugger will have problems. (JSR45 is
concerned with mapping class file contents to multiple source files).

However, I havent seen your problem with line number attributes before.
Although the AspectJ compiler does understand many of the preferences for
the normal Java compiler (accessible through Preferences->Java->Compiler),
I dont *think* it respects the 'Add line number attributes to generated
class files' option. I think by default we *do* generate the line number
attributes... Hmmm. You could raise a bug on bugzilla for this, its
something we ought to look at.

Andy.
AJDT Development
Re: Debugging example causes "Absent Line Number Information" [message #574381 is a reply to message #27732] Wed, 28 January 2004 16:00 Go to previous message
Eclipse UserFriend
Originally posted by: emmanuel.pirsch.org

Hi,

I have the same problem.

I use AJDT 1.1.4. I'm unable to set a breakpoint in any of my sources
files. Even if some line of code is not advised.

My aspect source files are in project A. In project B I create a .lst
file with all the source from A and B. Note that B is an ejb-jar.

I use MyEclipse to deploy an EAR (thar include B ejb-jar and a JunitEE
war to run my unit tests) on an Weblogic 8 instance (which run in debug
mode within Eclipse). Before adding some aspects, I was compiling with
the eclipse compiler and been able to use the debugger without any problems.

Since I converted the project to an AspectJ project, I've been unable to
set any break point in my code.

I've tried adding the "-g" option to the project/aspectj/non standard
compiler option but it did not changed anything.

Any clues?

The weird thing is that I remember being able to debug some sample
project I'va made when learning AspectJ.

This is very annoying as the productivity that AspectJ can provide is by
far decrease by the lost of productivity of being unable to use the
debugger.

With the added weakness of being unable to package Aspects in .jar and
reuse them in a useful way (if I do that and compile within Eclipse,
then the outline view gives error whenever I expand the "Advised By"
element and I still have the debugger problem), I'm considering not
using AspectJ anymore. That would be a great setback from me as I'm a
strong advocate of AOP (I've been making presentation about AOP to other
developers/architects within our organization) and this is the first
large project (>1 year of development) were we wanted to apply AOP.




ps: I would be very glad to help in the development of AspectJ/AJDT but
I don't have enough free time available right now.


Andy Clement wrote:
> Hi Colin,
>
> We know that debugging with AspectJ projects is not perfect. The
> restrictions I know about are:
>
> - You can't set breakpoints within aspects - because the eclipse JDT code
> that tries to add them cannot parse the structure of an aspect.
>
> - Some kinds of advice is inlined, namely around advice. This means you
> will have some source files that contains code that originated from
> multiple locations - some code from the original source code for your java
> class and some code from the aspect that you have woven into the class -
> without proper JSR45 support, the debugger will have problems. (JSR45 is
> concerned with mapping class file contents to multiple source files).
>
> However, I havent seen your problem with line number attributes before.
> Although the AspectJ compiler does understand many of the preferences for
> the normal Java compiler (accessible through Preferences->Java->Compiler),
> I dont *think* it respects the 'Add line number attributes to generated
> class files' option. I think by default we *do* generate the line number
> attributes... Hmmm. You could raise a bug on bugzilla for this, its
> something we ought to look at.
>
> Andy.
> AJDT Development
>
>
Re: Debugging example causes "Absent Line Number Information" [message #574412 is a reply to message #30043] Wed, 28 January 2004 17:14 Go to previous message
Eclipse UserFriend
Originally posted by: emmanuel.pirsch.org

Hi again,

I just wanted to add that hot code replacement is also not working with
an AspectJ project... adding to the loss of productivity.



Emmanuel Pirsch wrote:
> Hi,
>
> I have the same problem.
>
> I use AJDT 1.1.4. I'm unable to set a breakpoint in any of my sources
> files. Even if some line of code is not advised.
>
> My aspect source files are in project A. In project B I create a .lst
> file with all the source from A and B. Note that B is an ejb-jar.
>
> I use MyEclipse to deploy an EAR (thar include B ejb-jar and a JunitEE
> war to run my unit tests) on an Weblogic 8 instance (which run in debug
> mode within Eclipse). Before adding some aspects, I was compiling with
> the eclipse compiler and been able to use the debugger without any
> problems.
>
> Since I converted the project to an AspectJ project, I've been unable to
> set any break point in my code.
>
> I've tried adding the "-g" option to the project/aspectj/non standard
> compiler option but it did not changed anything.
>
> Any clues?
>
> The weird thing is that I remember being able to debug some sample
> project I'va made when learning AspectJ.
>
> This is very annoying as the productivity that AspectJ can provide is by
> far decrease by the lost of productivity of being unable to use the
> debugger.
>
> With the added weakness of being unable to package Aspects in .jar and
> reuse them in a useful way (if I do that and compile within Eclipse,
> then the outline view gives error whenever I expand the "Advised By"
> element and I still have the debugger problem), I'm considering not
> using AspectJ anymore. That would be a great setback from me as I'm a
> strong advocate of AOP (I've been making presentation about AOP to other
> developers/architects within our organization) and this is the first
> large project (>1 year of development) were we wanted to apply AOP.
>
>
>
>
> ps: I would be very glad to help in the development of AspectJ/AJDT but
> I don't have enough free time available right now.
>
>
> Andy Clement wrote:
>
>> Hi Colin,
>>
>> We know that debugging with AspectJ projects is not perfect. The
>> restrictions I know about are:
>>
>> - You can't set breakpoints within aspects - because the eclipse JDT code
>> that tries to add them cannot parse the structure of an aspect.
>>
>> - Some kinds of advice is inlined, namely around advice. This means you
>> will have some source files that contains code that originated from
>> multiple locations - some code from the original source code for your
>> java
>> class and some code from the aspect that you have woven into the class -
>> without proper JSR45 support, the debugger will have problems. (JSR45 is
>> concerned with mapping class file contents to multiple source files).
>>
>> However, I havent seen your problem with line number attributes
>> before. Although the AspectJ compiler does understand many of the
>> preferences for
>> the normal Java compiler (accessible through
>> Preferences->Java->Compiler),
>> I dont *think* it respects the 'Add line number attributes to generated
>> class files' option. I think by default we *do* generate the line number
>> attributes... Hmmm. You could raise a bug on bugzilla for this, its
>> something we ought to look at.
>>
>> Andy.
>> AJDT Development
>>
>>
Re: Debugging example causes "Absent Line Number Information" [message #574454 is a reply to message #30043] Wed, 28 January 2004 18:30 Go to previous message
Eclipse UserFriend
Originally posted by: emmanuel.pirsch.org

Hi Again,

I've looked with "javap -l ..." and I can see that the line number
information is present in the compiled .class files. That's weird!

So it looks like the .class file are OK, but for some reason I cannot
set breakpoint when debugging them... Any idea?


Emmanuel Pirsch wrote:

> Hi,
>
> I have the same problem.
>
> I use AJDT 1.1.4. I'm unable to set a breakpoint in any of my sources
> files. Even if some line of code is not advised.
>
> My aspect source files are in project A. In project B I create a .lst
> file with all the source from A and B. Note that B is an ejb-jar.
>
> I use MyEclipse to deploy an EAR (thar include B ejb-jar and a JunitEE
> war to run my unit tests) on an Weblogic 8 instance (which run in debug
> mode within Eclipse). Before adding some aspects, I was compiling with
> the eclipse compiler and been able to use the debugger without any
> problems.
>
> Since I converted the project to an AspectJ project, I've been unable to
> set any break point in my code.
>
> I've tried adding the "-g" option to the project/aspectj/non standard
> compiler option but it did not changed anything.
>
> Any clues?
>
> The weird thing is that I remember being able to debug some sample
> project I'va made when learning AspectJ.
>
> This is very annoying as the productivity that AspectJ can provide is by
> far decrease by the lost of productivity of being unable to use the
> debugger.
>
> With the added weakness of being unable to package Aspects in .jar and
> reuse them in a useful way (if I do that and compile within Eclipse,
> then the outline view gives error whenever I expand the "Advised By"
> element and I still have the debugger problem), I'm considering not
> using AspectJ anymore. That would be a great setback from me as I'm a
> strong advocate of AOP (I've been making presentation about AOP to other
> developers/architects within our organization) and this is the first
> large project (>1 year of development) were we wanted to apply AOP.
>
>
>
>
> ps: I would be very glad to help in the development of AspectJ/AJDT but
> I don't have enough free time available right now.
>
>
> Andy Clement wrote:
>
>> Hi Colin,
>>
>> We know that debugging with AspectJ projects is not perfect. The
>> restrictions I know about are:
>>
>> - You can't set breakpoints within aspects - because the eclipse JDT code
>> that tries to add them cannot parse the structure of an aspect.
>>
>> - Some kinds of advice is inlined, namely around advice. This means you
>> will have some source files that contains code that originated from
>> multiple locations - some code from the original source code for your
>> java
>> class and some code from the aspect that you have woven into the class -
>> without proper JSR45 support, the debugger will have problems. (JSR45 is
>> concerned with mapping class file contents to multiple source files).
>>
>> However, I havent seen your problem with line number attributes
>> before. Although the AspectJ compiler does understand many of the
>> preferences for
>> the normal Java compiler (accessible through
>> Preferences->Java->Compiler),
>> I dont *think* it respects the 'Add line number attributes to generated
>> class files' option. I think by default we *do* generate the line number
>> attributes... Hmmm. You could raise a bug on bugzilla for this, its
>> something we ought to look at.
>>
>> Andy.
>> AJDT Development
>>
>>
Previous Topic:Problem using AJDT with Eclipse 3.0M6
Next Topic:Problem in default.lst "Use relative paths only, omitting..."
Goto Forum:
  


Current Time: Mon Dec 22 18:39:16 GMT 2014

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

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