[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
|
Re: [jdt-debug-dev] JavaMethodEntryBreakpoints
|
Sorry, but I forgot to mention that the same routine works for any other
method (not constructors, that is).
Philipp
Thanks for the advice, but even
after I changed "FileReader" to "<init>", the
bahavior does not change: the breakpoint is created (it is shown in the
"breakpoint"-list of the debugging perspective), but if I
select "debug as JUnit Test", the execution is _not_
interrupted upon reaching the breakpoint (and it is definitely
reached).
However, I found out, that I was using the wrong resource. But I changed
"FileReader" to "DummyTest" (which is a JUnit test
class created in the default package) and tried to set a breakpoint on
its constructor using the described method. And that did not work either
(same behavior). If I set the breakpoint manually (i.e. by double
clicking), it works fine.
So again, this is my statement:
JDIDebugModel.createMethodEntryBreakpoint(resource,
"DummyTest",
"<init>",
"(QString;)V", // It's really
QString; here, not "Ljava.lang.String;" as in
java.io.FileReader
0, -1, -1, 0,
true, attributes);
The breakpoint appears in the breakpoint list, but execution is not
paused upon reaching it. Why?
And, something completely different: How _do_ I get the correct resource
of any java file that does not neccessarily have to be in my workspace
(if you know a quick how-to, I'd appreciate hearing it, however, I have
not looked into that problem yet, and I suppose it could really be
simple).
Once again, I thank you very much for your help and your patience.
Philipp Bouillon
(Forgot to
mention)...For a method breakpoint, the line numebrs/source positions are
simply used to render the breakpoint in the editor.
Darin
Darin Wright/Ottawa/IBM@IBMCA
Sent by: jdt-debug-dev-admin@xxxxxxxxxxx
04/24/2003 09:29 AM
Please respond to jdt-debug-dev
To:
jdt-debug-dev@xxxxxxxxxxx
cc:
Subject: Re: [jdt-debug-dev]
JavaMethodEntryBreakpoints
It looks like you are specifying the wrong name for the method - i.e.
"FileReader". If you are referring to a constructor, you should
use "<init>".
Darin
Philipp.Bouillon@xxxxxxxxxxx
Sent by:
jdt-debug-dev-admin@xxxxxxxxxxx
04/24/2003 09:08
AM
Please respond to
jdt-debug-dev
To:
jdt-debug-dev@xxxxxxxxxxx
cc:
Subject: [jdt-debug-dev]
JavaMethodEntryBreakpoints
Hello,
I am trying to programatically set a JavaMethodEntryBreakpoint.
Can this be done _without_ knowing the line number of the method
definition? It does not seem to work for me.
This is, what I do:
I have an IResource object and a name of a method, where I'd like
to
set a breakpoint. Say, for example "java.io.FileReader" (and
let's
suppose, that I do not have the source code for that class).
Aside: If I do have the source code, it's no problem at all -- I
determine the source range and the line number, and I can set the
breakpoint just perfectly.
So, what can I do now?
I tried a JDIDebugModel.createMethodEntryBreakpoint(resource,
"java.io.FileReader", "FileReader",
"(Ljava.lang.String;)V", 0, -1, -1,
0, true, attributes);
But that did not work (I also tried -1 as line number). Is it
because
of the signature, or did I miss something else?
Thanks for your help,
Philipp Bouillon
_______________________________________________
jdt-debug-dev mailing list
jdt-debug-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/jdt-debug-dev
PGP-PublicKey:
http://philipp.bouillon.bei.t-online.de/PGPPublic.htm
PGP-Fingerprint: DCF4 3600 5DDB A23B 4DCD 121D D626 3131 71F2 EA9F
PGP-PublicKey:
http://philipp.bouillon.bei.t-online.de/PGPPublic.htm
PGP-Fingerprint: DCF4 3600 5DDB A23B 4DCD 121D D626 3131 71F2
EA9F