Re: Debugger and function calls



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jan_bar schreef:
To make the things clear, here is a sample:

public static void main(String args[]) {
String s = "hello";
s = null;//<-- breakpoint here
}

When the breakpoint is hit, I want to evalue expression
"System.out.println(s)", but Eclipse says
com.sun.jdi.InvalidTypeException: Type of the value not compatible with the
expected type. occured invoking method.

Normally, you should see s in the Variables view. If that isn’t there,
open it. If you then click on s, you will automatically see its String
representation. You can then click there and enter additional queries
if you like. Also in the expressions view, although I am also still
struggling with it.

Did you read the help documentation that comes with Eclipse? It is all
in there, albeit very terse.

H.

- --
Hendrik Maryns

==================
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEfbj8e+7xMGD3itQRAkgWAJ4owWhfRhjNeRyfVfnFbNESKNlnxQCeN2vz
hQvz1gPmgutSXqLM3ZCR9G0=
=NR7R
-----END PGP SIGNATURE-----
.



Relevant Pages

  • Re: Debugger and function calls
    ... public static void main{ ... When the breakpoint is hit, I want to evalue expression "System.out.println", but Eclipse says ...
    (comp.lang.java.programmer)
  • Re: Debugger
    ... To attach to a running process using VC (this is Visual Studio 2003 specific, ... go to your Java code. ... At this stage /don't/ use Eclipse to do this, ... Now you may see that your breakpoint has changed to show a '?'. ...
    (comp.lang.java.programmer)
  • Re: Debugger
    ... To attach to a running process using VC (this is Visual Studio 2003 specific, ... go to your Java code. ... At this stage /don't/ use Eclipse to do this, ... Now you may see that your breakpoint has changed to show a '?'. ...
    (comp.lang.java.programmer)
  • Re: Eclipse breakpoints
    ... does not suspend execution at the breakpoint. ... So what looks like a source line in your real source isn't actually executable in the generated source, so it can't actually sustain a breakpoint. ... I have sometimes messed up Eclipse's project properties wherein it loses track of the source or build directories. ... If you modify source from outside Eclipse's sphere of influence, make sure you tell Eclipse to refresh all its files and rebuild before you attempt to debug again. ...
    (comp.lang.java.programmer)
  • Re: Setting breakpoint on the end of the method in Eclipse
    ... debugger can stop here" is not true - it can stop on method exit. ... least the option to do this in Eclipse - i.e. to make code with nop ... Right click the breakpoint indicator, ... formatting or some of the numerous features I could list here. ...
    (comp.lang.java.programmer)