Re: Debugger and function calls




"jan_bar" <nospam@xxxxxxxxxxxxx> wrote in message news:e5k7uv$1sv3$1@xxxxxxxxxxxxxxxxxx
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.

If I put the above code in a class, add the breakpoint on the line with the comment, run the debugger, switch to the Expression view, and add the expression "System.out.println(s)", the expression evaluator correctly reports that the expression evaluates to void.

In other words, it works when I try it.

- Oliver

.



Relevant Pages

  • Re: Debugger and function calls
    ... When the breakpoint is hit, I want to evalue expression ... Did you read the help documentation that comes with Eclipse? ...
    (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)