"Roedy Green" <see_website@mindprod.com.invalid> wrote in message
news:us9lv412dsoc3hrruskmv14fdrse4mug9g@4ax.com...
On Thu, 30 Apr 2009 14:28:02 -0700 (PDT), ed.peschko@gmail.com wrote,
quoted or indirectly quoted someone who said :
Now, I'd like to be able to trace line by line.. Is this possible
using the jdi?
probably not. I doubt such markers are embedded in the class file.
--
Roedy Green Canadian Mind Products
http://mindprod.com
If you want control of a program in terms of its structures, you need
a tool that understands the structure of the program.
Class files have lost most of that structure by virtue of
being low level "machine" code.
A program transformation tool can be used to insert arbitrary
instrumentation in (Java or any other lanuage) source code.
Operating on source, it handles program structures, e.g.,
statements, declarations, methods, constructors, ...
as directly nameable, accessible entities. Think of this
as compile-time reflection with incredibly fine grain.
This can be used to implement your line-by-line tracer,
if you want.
fields, as directly nameable, accessible entities.
Compiled with "-g", it can even trace back to corresponding source code.